You might think your brain and body spend their sleeping hours in a blissful state of restful inactivity, but it’s not so. There’s a lot going on inside you while you’re slumbering.

Here are some ways our bodily performance changes as we’re sleeping:

  • Digestive juices: The amount of acid in our stomachs typically decreases while we sleep, but if we’ve got an ulcer, it increases.

  • Hormone production: Two female reproductive hormones (follicle stimulating and luteinizing) are released during sleep. Additionally, growth hormone is released in children and young adults while they sleep.

  • Kidney performance: The rate at which our kidneys filter waste slows down while we’re sleeping. This reduction in renal production is why that first morning urine is so concentrated.

These alterations from waking life are slight compared to what happens in our brains, muscles, and circulatory system.

Our breathing, heart rate, muscle movements, and the like change according to whether we’re in NREM- or REM-stage sleep. During certain stages of NREM sleep, many of our bodily functions slow compared to normal waking levels, including brain activity, heart rate, blood pressure, respiration, and body temperature. Our muscles are relaxed and, for the most part, blood flow to the brain doesn’t change and sexual arousal doesn’t occur.

Based on brain-wave patterns, scientists know we pass through five stages of sleep. Stages one through four are NREM (non-rapid eye movement). The last stage is REM sleep. Our brains cycle through the five stages at 90 to 110-minute intervals, four to six times each night.

In REM stage, each of these processes increases beyond normal waking levels. In addition, blood flow to our brains can increase anywhere from 50 to 200 percent and sexual arousal increases. Our eyes move together, back and forth and up and down, as if we were awake and focused on a moving object. The muscles in our heart, lungs and such continue to move, but the muscles in our limbs become paralyzed.

During REM, the portions of our brain responsible for learning become active. Perhaps not coincidentally, REM is also the stage of sleep when we dream, although scientists can’t figure out why we dream.

Although there are still a lot of sleep-related questions to be answered, scientists have learned quite a bit about what happens to our bodies when we don’t get enough sleep. Researchers know that our ability to think quickly and clearly, solve math problems, remember details, and perform some physical tasks are diminished when we’re sleep deprived. People who go a very long time without sleeping can become paranoid and hallucinate.

If you want to take advantage of sleep’s benefits (both known and yet-to-be discovered), get the proper amount of rest. For adults, that usually means 7 to 8 hours of sleep per night.