Here is a fascinating talk by the famous Steve Wozniak that resonated with me. The key takeaway here is his point about where and WHEN he is the most creative. Wozniak goes onto explain that’s how he came up with the idea of color display for the mac.
“When you’re without sleep, and when you’re going to sleep your inner head goes briefly into this period of really…creativity kind of thinking. It’s not restricted to the normal thoughts of life, and the day. When you’re waking up your head’s a little like that too, well my head was kind of in this floating half-asleep state and out.”
TLDR; When you’re sleep deprived and working hard on a project, when you drift off to sleep that’s the time you may be the MOST creative. Pretty cool.