It happens to me sometimes, depending on the subject or action and especially my thoughts about it. If it involves a part that I don't agree completely with, then I really can't do it until it is fixed.
But yes, I do get bursts of energy, especially when I am creative and healthy. I suggest choosing a part, subject or action that you know you aren't going to leave easily, so that it gets to develop. And you should also get the tools or the things that help you in that action, for greater productivity or for making them happen more frequently.
Motivation is passion, and if you aren't doing what makes you fell well, then you won't get many bursts, if that is what causes them.