To function adequately you need seven to eight hours sleep each night, preferably unaided by drugs or alcohol. A person can last for about 72 hours without any sleep whatsoever until it becomes detrimental to their health. Eleven days is the longest anyone has gone without sleep before they died. Yikes! This is not said to scare you, rather it is to reassure you that when you think you haven’t slept for a few nights it is most likely that you have. You just haven’t gone into REM sleep.
Rapid eye movement (REM) is when we dream and allows our brain to go through the day’s events. We enter a series of sleep cycles across the night with each REM period increasing in duration. A full sleep cycle lasts between 90 and 120 minutes and we will have four to five cycles each night. If you are sleeping poorly you may only have just the one cycle hence you will feel tired and your brain may not function as it should.
Looking at your brain using a computer analogy, dreams are important as they allow our brain to 'defrag' the events of the day. When we have a weird dream, say the one where the lion jumped onto the boat as we were flying over a mountain, it is our brain not quite putting the files in the correct file tray as it works through events. During the day you would have seen the picture of a lion, travelled on a boat, and watched a movie about flying so your brain just mashed it up a bit and came up with this version. Don’t worry about these dreams, they are normal.
Bad dreams are where your brain is struggling because you have probably been involved in something that has impacted your amygdala (the emotions part of your brain) causing an emotional response. That active memory is then stored in your hippo-campus (the brain’s vault of memories) and has left an impact, a scar or mark in your hippo-campus. Don’t be bothered by one or two nights of bad dreams. If the bad dreams carry on for more than three days then you should go and see a professional to put some perspective on what is occurring.
The other thing that may have caused the bad dream is that you are hot. No, not in that way, temperature hot. Our brain continues to operate if it is warm hence we have trouble getting to sleep when the air temperature is high. If you wake up from a nightmare try removing a blanket and see what happens, I bet it works.