I just started reading 'Founders at Work' and find it kind of funny that they cite Steve Jobs in this article, when during his interview, Woz said that some of their best ideas (when building Apple) came after several days of not sleeping.
On the other hand, some of my finest moments of clarity have come after all-night cramming sessions. It's as if you fatigue all the usual pathways and are open up to entirely new ways of seeing things.
Don't confuse working on a problem for a long time, understanding it very clearly with having the idea in your head and regurgitating a solution in one long stint. Woz emphasized this in his 2005 Startup School talk. Understanding an idea so completely in your head you can simplify it no more.
Edit: here's a wiki article about the topic: http://en.wikipedia.org/wiki/Sleep_and_creativity