For me, I find such a state happens when I go too hard out for too long then get frustrated and I force myself to take a break.
Then I split my time into developing, seeing friends, going for long walks and even playing an old retro game like Halo for the PC or Soldier of fortune or something like that.
It works to a fair degree but not all the way, still, my motivation rarely fails me now a days

One of the biggies I found is that I dont document enough my stages which means that quite often, I have reinvent the wheel when writing scripts and that brassess me off no end
