Meditation works well for me.
I have a cushion next to my desk and whenever I can't focus or don't know what to do next, I sit for ~5-10 min with eyes closed and usually the next best task becomes apparent. I then visualize it clearly and think about the sequence of steps needed to accomplish it.
If I don't do that, I usually find myself wasting extra time before I arrive at the next task, or I feel more low-energy / unfocused that I would have otherwise.
Regular exercise pairs well with this to keep your baseline energy up.