I think I got this idea from HN somewhere but I cannot remember: when you are running good, and the ideas are coming easily, stop before you get stuck. That way when you come back to something you know exactly what to do next and its easier to find the thread.
Also, learning how to suffer through really painful exercise has improved my ability to focus at work.