Every night your conscious mind shuts down and every morning you wake up, ready for a brand new day.

But while the conscious part of your mind shuts down, your brain remains very much active throughout the night. Part of this brain activity generates what can sometimes be extremely vivid and even haunting images during the rapid-eye movement (REM) stage of sleep - what we know as dreams and nightmares.

The average person will spend 19.3 years of their entire life in this trance-like state we know as sleep. But even though we spend nearly 1/3 of our lives sleeping, most of us know surprisingly little about what happens to our brains when we shut off for the night.

Below are 5 interesting facts about dreams you never knew:

1. Sleep walking is a legitimate defense to homicide

While it doesn’t happen often, there have been numerous reported cases of sleepwalkers killing people while sleepwalking. As of the year 2000, there were 68 reported cases in the literature.

In order to be found guilty of murder in the classical Western legal system, a person has to have both a mens rea (guilty mind) as well as an actus reas (guilty act), in order to be guilty. For this reason, sleepwalking has been used successfully as a defense to homicide. In other words, because sleepwalkers in their sleep like state cannot form the legal intent to commit murder - the fact that they stabbed someone with a knife, shot them in the face, or bludgeoned them with a hammer - doesn’t mean that they’re legally guilty of murder.

Perhaps the most incredible “not guilty” verdict in a sleepwalking homicide was the Canadian case of Kenneth Parks, who was acquitted in 1987 after:

Getting up in the middle of the night

Driving 14 miles to his in-laws

Bludgeoning his mother-in-law with a tire iron

Strangling his father-in-law

Stabbing them both with a kitchen knife

His mother-in-law died, while his father-in-law survived, but just barely. Parks turned up shortly after at the police station, apparently confused.

As unbelievable as the case may be, the jury believed that Parks was legitimately sleepwalking when the attack occurred and thus found him not guilty. He was reportedly very close with his in-laws, and didn’t seem to realize during the attack that he had severed the tendons in both of his hands. His family also had a strong history of sleepwalking.

2. You can be conscious in a dream

For most people, dreaming is a passive state where the impossible is possible

it’s another reality we experience, totally separate from our normal lives. While the images may be extremely vivid in the moment, they quickly fade as we wake up and realize - with either great relief or extreme disappointment - that it was “only a dream”.

Yet not all dreams are like this. Lucid dreams are dreams where you are conscious that you’re dreaming, but your brain is still in a state of sleep. Approximately 50% of people have experienced a lucid dream in their life, though the amount of people who experience lucid dreams on a regular basis is significantly lower.

For a long time, psychologists and researchers denied that true lucid dreams were possible. They argued that if accounts of lucid dreaming were valid, they likely occurred during moments of transition between sleeping and waking, and certainly not during the deep REM sleep where dreams are normally found. After all, how do you prove you’re actually lucid while dreaming - you can’t very well shout out that you’re dreaming during a dream; your muscles are paralyzed when you’re sleeping, a phenomenon that prevents you from running into a wall when a tiger is chasing you in your nightmares.

In 1978, researcher Keith Hearne of the University of Hull was the first to scientifically confirm the lucid dreaming phenomenon by exploiting the fact that not all of the body’s muscles are paralyzed during sleep - during REM sleep, the eyes can still move. Could a lucid dreamer actually move their eyes in such a way as to notify the researchers that he/she had become conscious during a dream?

As a matter of fact, yes. A lucid dreamer in Hearne’s lab - Alan Worsley

managed to move his eyes left and right in a pre-determined pattern each time he became lucid. And by monitoring Worsley’s eyes with a polygraph and watching out for the pre-determined pattern, Hearne was able to confirm that Worsley was in fact consciously communicating while still deep in REM sleep.

Hearne’s research revealed that the lucid dreams experienced by Worsley tended to happen most often in the early morning, approximately 30 minutes into a REM period. The lucid dreams tended to last approximately 2-5 minutes. Further research also found that lucid dreams tended to occur most frequently at times of high arousal during REM sleep.

3. Men and women dream about sex the same amount

Surprisingly, men and women both report the same amount of dreams with sexual content, despite the fact that men experience sexual thoughts more frequently in everyday life. In a study at the University of Montreal that looked at over 3,500 dream reports, around 8% of the dream reports from both men and women contained sexual activity. However, not everything about dreaming is different than reality - men in the study were twice as likely to have dreams with multiple sexual partners than women.

Some other funny sex facts about dreams included the fact that - while both men and women reported experiencing an orgasm in 4% of their dreams - women were the only ones who actually dreamed about their partners having an orgasm. 4% of women in the study reported experiencing dreams where their partners would orgasm, but none of the men in the study reported orgasms other than their own. Hopefully for the ladies, this isn’t an accurate reflection of real life.

4. Women experience more nightmares than men

A study by psychologist Jennie Parker of the University of the West of England found that women experience more nightmares than males. Women not only reported more nightmares, but they also reported their nightmares as more emotionally intense.

5. Why do we dream?

Ever since humans have existed we have wondered why we dream. Some like Sigmund Freud speculated that dreams were manifestations of our unfulfilled and repressed desires, while others believe that dreams are simply a side effect of our brain’s activity in REM sleep.

According to Harvard psychologist Deirdre Barrett, at least part of the reason we sleep is to process the thoughts and problems that trouble us during our waking hours. Barrett’s theory posits that the illogical aspects of dreams and the vivid visual images we experience during our dreams provide a way to process the kind of out-of-the-box thinking that isn’t possible during our usual reality.

Whatever the reason for your dreams, the likely answer is that your dreams have evolved to fulfill multiple functions. Critical thinking may be one reason, information processing might be another. Even with the tremendous scientific strides we’ve made in the 20th and 21st centuries, there’s still much about sleep and dreams we really don’t know. Who knows, maybe dreams really are a veiled window into our baser urges and impulses, like Freud suggested.