Despite all we know about the brain, so much of it still remains a mystery. Consciousness is still poorly understood; people who’ve lost limbs experience sensations called “phantom” feelings from their missing body parts, and we still have no idea where dreams come from. It might be a while before we figure out why we dream, but scientists are getting closer to discovering why some people are better at it. In a new study, researchers have found lucid dreaming comes from a propensity for self-reflection.

Lucid dreamers have the ability to do what many people can’t during their sleep: They’re not only aware they’re dreaming but, to an extent, they can control what happens, too — from choosing what to say to someone to the direction they want to move in. The new study, from the Max Planck Institute for Human Development and the Max Planck Institute of Psychiatry found people who were better at lucid dreaming also showed higher levels of activity in the anterior prefrontal cortex, the part of the brain responsible for controlling cognitive processes while awake as well as self-reflection. Because of this extra activity, this part of the brain was also larger.

“Our results indicate that self-reflection in everyday life is more pronounced in persons who can easily control their dreams,” said Elisa Filevich, of the Center for Lifespan Psychology at the Institute for Human Development, in a press release. Self-reflection is also known as metacognition, which is the brains ability to think about thinking. Lucid dreamers are more aware and controlling of their dreams because they’re already so aware of their own thoughts while awake. As dreamers, this awareness is simply strong enough to remain activated.

For the study, Filevich and her team asked participants to complete a questionnaire to assess levels of lucid dreaming, and then put them through both functional and structural magnetic resonance imaging (MRI) scans. They found people who reported higher levels of lucid dreaming were also the ones with more gray matter in the anterior prefrontal cortex — thus making this part of the brain larger.

The findings fall in line with previous research finding lucid dreamers are more insightful. The same study also found they were better at problem solving, specifically with regards to recognizing patterns. In our dreams, patterns, like a door knob being used to open a door, fall apart. Lucid dreamers recognize these patterns aren’t normal.

Increasing self-reflection and awareness is key to lucid dreaming. If you’re interested in learning how to lucid dream, try following these steps.

Source: Kühn S, Brick TR, Dresler M, Filevich E. Metacognitive mechanisms underlying lucid dreaming. The Journal of Neuroscience. 2015.