I shall use an acquaintance/client of mine that I have known for years as an illustration. A very successful businessman, he and his family have a love of the Balinese lifestyle, though they live here in Australia.
His wealth and success meant that he could buy a huge property just outside town and turn it into a little 'mini Bali resort'. He had a beautiful artificial lagoon, plunge pools, thatch huts etc. It really was the envy of most people here.
But after about 2 years of that, they sold the property. I was as shocked as most other people and asked him why, but he said that it just became too 'samey' day after day, living in that resort style environment, and they were craving something different.
So they actually moved to Bali, and bought a house there. After about 12 months, they moved back. Once again, I asked, and received a similar answer. Living in 'holiday mode' for months on end, and getting waited on hand and foot by locals, while it sounded like heaven for most people, turned into a chore, and they got bored and craved something different.
For me personally, I have spent the past decade or so setting up my business so that it can be operated from anywhere. We bought quite a nice house with a downstairs separate office so I could work from home and be near the kids when they were younger and going to school just up the road.
Whilst 80% of the time, it IS bliss, and works well, and I am happy - there are the odd times that I get cabin fever, or crave working in an office environment again - just for the change mainly.
My solution to that was to essentially go down the 'craftsman' route - by giving up doing general IT support work, which at the time was the mainstay of my business, and focusing on just software development.
But not 'software development' where I would basically be a project manager and farm the actual work out to overseas contractors. I meant 'software development' as a craft where it would only be myself touching the code, liaising with the customers, and doing all the design, coding, testing etc.
Much as a bespoke cobbler or blacksmith would do in the old days - I would talk to a customer who approached me, help them to work out what they wanted, and then (this is the important bit) I would decide whether to take on the job, or refer them onto another colleague.
I would only take on work that I found challenging, or that would push me to learn new technologies or methodologies. Not TOO much, otherwise I wouldn't be productive, but just enough so that I wouldn't get bored by the project, and could add another small skillset to my experience roster when I had finished.
I also reverted to working on basically one project at a time, and was turning away more work that I was taking on. I would treat each project as an 'end to end' thing - and would take pride when I finished and delivered the results to my client. Throwing myself wholly and solely into my work like this helped to keep my batteries charged a lot longer. I guess it is a lot like a Startup founder working completely focused on their 'baby' (NB, I am also working on a startup of my own at the moment).
Sure that was a bit of a hit on cashflow and profitability, but my personal happiness at work went up. Owning a project from start to finish, then basically being able to hand it over and dust my hands off and stop thinking about it altogether before starting the next one helped to keep me mentally sharp and focused. (Of course, there are always return clients who want extras or enhancements, but I similarly treat those as a whole new separate project each time).
The other thing that helped was to turn my office space into a mix of my hobby and professional passions. I am an avid guitarist, so my programming space is also a mini recording studio, and I often pick up a guitar and play while waiting for downloads/compiles or just in between tedious tasks. That also helps to keep my mind fresh and keeps it from wandering and wishing for different things.
I believe that the death of passion is what brings about that restlessness that people feel when they crave change. Keeping that passion burning and fresh is the key IMHO. Having said that - there is still no substitute for a lengthy break from the day to day routine in your life. I forgot how nice it was to take a holiday away from tech and even guitars every now and then. Keeps me hungry and reminds me how much I miss it. I need to consciously do it more. Hope this little diatribe helped to answer your question in some small way! :)
(Note: For some more background, check the links in my HN bio - you will notice on my business web page, I stress the concept of 'software craftsmanship' there too, so my clients understand how I work).