Sleep is great for creativity. Sleep is great for problem solving.
Being tired isn’t a badge of honor
Jason Fried

That makes me think of the diffused mode (vs focused mode) Barbara Oakley defines beautifully in her online classe Learn How to Learn:

“Researchers have found that we have two fundamentally modes of thinking, [she] calls them the focused and the diffused modes. We are familiar with focusing, it is when you concentrate on something you are trying to learn or understand, but we’re not so familiar with diffused thinking, it turns out that this more relaxed thinking style is related to set of neural resting state”.

It lets our mind slip into a more relaxed and unconstrained state to defocus, explore and utilize broader area of our brain — sparking further creativity and helping us solve some problems we could not have solved in focused mode.

Dali utilized that technique. He would sit down and relax and often think about what he had been previously thinking on, he would have a key in his hand and sometimes he would begin to fall asleep. The moment he began to doze, the spoon would slip from his fingers and clatter on the ground just in time so he could capture his diffused mode ideas and images. That would help him conjure up these extraordinary images from his subconscious that he used in his surrealistic paintings.