I know the feeling all too well: sometimes I don't feel motivated to do anything, and that scares the hell out of me because of the sheer volume of tasks and projects I have, combining my day job as an investment banker with my passion as a high performance coach, student, writer, etc.
One thing I learned though is that MOTIVATION doesn't just "happen randomly"! There are triggers that cause you to be more or less motivated.
Some are physiological (for example less sleep means less energy and less motivation), others are psychological (mood, stress, distractions, etc).
But do you spot the trend in these examples? They are ALL factors YOU can control! You can sleep better, you can CONTROL your mood (you can!).
Next time you feel motivated, grab your journal and make a note of it and add the REASON you feel motivated, so you can replicate it in the future.
When you feel demotivated, again grab your journal and make a note of WHY you feel demotivated, and then DO SOMETHING about those reasons.
Motivation doesn't "just happen", you MAKE IT HAPPEN!