You likely won’t dream when it’s either too hot or too cold. That’s because your brain will focus all its energies on its primordial role -- keeping you alive.

Swiss scientists studying the brains of genetically engineered mice were able to watch how changes in temperature affected the sleep state of these animals. What they found is the brain prioritizes temperature control over dreaming especially in severe temperatures.

Dreaming also suppresses temperature regulation or thermoregulation, which keeps our bodies at the right temperature for continuing to sleep. Our body normally reacts to heat and cold by sweating, shivering, panting and flushing.

These defense mechanisms, however, can’t maintain our core temperature once REM (rapid eye movement) sleep starts. That’s because REM sleep demands a lot of energy.

Unbeknownst to most of us, REM sleep places a lot of physical demands on the human body. The brain of a person in REM sleep, which can account for up to 25 percent of an adult’s sleep cycle, eats up almost as much energy as when it’s awake.

Also during REM sleep, your breathing can increase, your eyes keep moving to track imagined characters, and your arms and feet twitch as they fight against the urge to move and wake you. All these activities drain you of energy when you’re asleep and combine to create an energy-depleting mental workout.

If you add a sleep environment that’s either too hot or too cold, your brain will compensate for this additional stress by refusing to let you dream so you can conserve enough energy to stay alive.

Faced with this scenario, our brain makes a choice. It either lets you dream or refuses to let you dream in favor of keeping your body from freezing or frying. The study said you brain can't do both.

"This loss of thermoregulation in REM sleep is one of the most peculiar aspects of sleep, particularly since we have finely-tuned mechanisms that control our body temperature while awake or in non-REM sleep,” said neuroscientist Markus Schmidt from the University of Bern and the Department of Neurology at Bern University Hospital.

It’s wise to remember the human brain consumes about 20 percent of a person’s body's energy for the average adult in a resting state. It demands so much to allow the brain to achieve its primary function – which is to process and transmit information through electrical signals.

This is a very energy intensive process in which about 25 percent of the brain’s energy goes to maintaining neurons and glial cells. The remaining 75 percent is used for signaling. This consists of sending and processing electrical signals across the brain’s circuits.