I am a music producer and often my "best" pieces always came to my mind shortly before I fell asleep. Sometimes I actually grab a recorder, hum the melody and finish the idea on the very next day.

My question is now: how can this be possible? In a state where my brain is supposed to shut down (and pretty much does) it is literally exploding out of ideas. I also feel a huge increase in euphoria in these very moments but I can't really tell whether this happens before or after I get the idea for a certain sound/melody.

Might it be that my creativity is "blocked" all day until my brain finally drops all obstacles which then makes way for my creative flow? Or is it that no new input needs to be processed as I lay in total darkness and silence and therefore new "material" to process isn't coming in which leads my brain to "invent" something?

This doesn't happen every time but most often when I am very tired and don't need longer than 15 minutes to fall asleep - usually this is a matter of hours for me, hours in which I am not productive at all.

  • $\begingroup$ Have you thought about the differences between the two states: the moment before going to bed and the moment when being at work? Hints: stress/constraints vs. relaxation, or focused vs. diffused mode of functioning of the brain... Maybe, at work, you are caging your brain, while before going to sleep you are signalling your brain to run into creativity. $\endgroup$ Commented Dec 15, 2015 at 22:15
  • 1
    $\begingroup$ I'm not a musician at all, but also had experiences where I could create melodies in my near sleep stages. Search for terms "hypnagogic" and "hypnopompic" sleep states $\endgroup$
    – Alex Stone
    Commented Dec 21, 2015 at 2:02
  • $\begingroup$ I'm mostly aphantasic (unable to visualize), but when I'm half asleep in the morning, I am able to visualize to a certain extent. It disappears though as soon as I become aware that I am doing it. $\endgroup$ Commented Dec 11, 2021 at 1:51

3 Answers 3


This is quite a well documented phenomenon - stereotypically these moments of creative insight occur in the shower. A google for 'psychology aha moment' or 'neuroscience creative aha' will give you some articles, in Psychology Today for instance, talking about this.

One characterisation of thought is that links between neurons are created and by travelling down the intricate pathway, you have the thought. A lot of conscious thought is driven by "picking" the "quickest" path and travelling down that, as it is economical in terms of energy use. One understanding of creativity is that it is combining of existing ideas in novel patterns. When you enter a more relaxed state, or even just a more distracted state such as showering or exercising, your brain is free to try novel combinations as you are not consciously driving it down specific well-worn pathways (the "easy" paths).

Mark Beeman has done research on this, which he calls it insight. For more information, see the article he co-wrote "The Aha! Moment: the Neural Basis of Solving Problems with Insight".

For another explanation, Alice Flaherty has done research linking these moments to dopamine release, which is more abundant in our brains when we relax. For more information see the publication "Frontotemporal and dopaminergic control of idea generation and creative drive".

  • 1
    $\begingroup$ As a note: there is little research that this is the -only- way to come up with creatively brilliant work. Most people experience moments of insight both within a highly focused state (often called 'flow') as well as in moments of cognitive distraction (when not thinking about the creative task). $\endgroup$
    – ALit
    Commented Dec 21, 2015 at 17:33

The brain is a complex system, that is to say one made of many (more or less) discrete components, each performing a specific function. These components are connected and work together. During neuroimaging studies, we observe some groups of brain areas that activate in a correlated manner, so-called large-scale brain networks. One such large-scale network and perhaps the most well-known is the default-mode network (DMN). In the past, this network was also called the task-negative network, since it appeared to only be active when no task was actively performed. We know today that it can in fact be active at all times, but it remains mostly associated with moments when no task is actively performed. As it turns out, this is also the network mostly responsible for "creativity", as explained here.

What you are describing is textbook DMN behavior: "In a state where my brain is supposed to shut down [...] it is literally exploding out of ideas". During the day, your brain is busy, and your focus on other tasks prevents your DMN from running free. While you are trying to fall asleep, it becomes more extensively activated, thus leading to increased creativity.

The points that @ALit makes are correct and in my opinion play some part in the creative process, but if you're looking for the traditionally accepted explanation, this is it.


Creativity is hindered by stress. When you are trying extremely hard to come up with this great musical masterpiece, you're going about it all the wrong way. Think about what artists say about their music so often: "It just came to me". Music (and creativity in general) are linked to inspiration. As you're going to sleep, your body and brain is shutting down. So you start to forget about the logistics of life (the left side of the brain) and your right side is allowed to think more freely.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.