Boredom is a big factor. When it's just a job, it's time to leave.
See your job as a funding source for what you want to do next. Do what's required and do it as quickly as you can, then network with those who can give you the growth you need for the next job.
People think the time to leave is when things become unbearable, or is a function of the time you've been there. It's not, ... The Doom-Loop System.
If you have a green light from your spouse and kids, life is going to be much easier.
If you're depressed or burnt out, your family is probably suffering the brunt of that as much as you are. They may prefer a pay cut to you're being so down.