Funnily enough, I actually take a nap sometimes when I can't figure out the solution to a problem or I'm going around in circles. Perhaps it's not realy sleep, but more often than not I wake up with the solution, or at least more ready to tackle the solution. I've also found almost ubiquitously that whatever had me completely confounded the night before is a hell of a lot easier to work out in the morning. Perhaps it…
Sleep seems to reset my mind. If I approach the same problem after waking up, I come up with a fresh perspective.
On the other hand, if I'm "in the zone" before I go to sleep, I wake up and it's gone.
I think that also explains my tendency to stay up till 7AM... need to take advantage of the productivity boost while it lasts.