Comment This is well-known (Score 2, Informative) 318
A few years ago, Dr. Herbert Benson came out with his book "The Breakout Principle" which describes and explains what this article is about. Basically, interrupting or changing context (go for a walk, solve unrelated puzzles, visit the gym, meditate) when you've reached a sticking point in a project will increase your effectiveness when you return to your task. Benson attributes this to bursts of nitric oxide in your brain, IIRC.
When we consider how much really occurs inside us without conscious thought, is this any surprise? Try walking up and down the stairs while consciously thinking about how you're doing it. Or how about language- your comprehension and speaking of your native tongue is largely unconscious as well.
Next time you're stuck in a coding problem, try it out. Go enjoy some absorbing activity for perhaps as little as 15 minutes, making sure to change conscious contexts, and then come back to your original task with a fresh viewpoint.