I don’t know what it is, but sometimes you just get a spark. The thing where the guy told me a server I manage was out of date was one of those sparks. It invigorated me enough that I went through all the servers I manage and made sure they were all up to date, and even found a few things that I had incorrectly configured long ago. This was relatively short-lived, maybe two weeks.
I find it to be this way with most projects I am involved in. You get all hopped up for one reason or another, then after a short while the love is lost. It was like that with my dissertation, with websites I develop, businesses I try and start, you name it. I think the key to getting past that is to keep finding interesting things to focus on rather than just burning out right away. If you can pivot within the same project perhaps you can gain moment.
Instead of working more on the main website, I could have moved to theming part of the client-facing back end, or working on copy or something. There are usually more things to do than just what is on the surface, so finding those additional tasks might be the key to getting over those hurdles.