Research confirms the brain, specifically the prefrontal cortex, is most active and readily creative immediately following sleep. Your subconscious mind has been loosely mind-wandering while you slept, making contextual and temporal connections. Creativity, after all, is making connections between different parts of the brain.