Sleep, snooze, shuteye. We spend one third of our life sleeping. A waste of time? Absolutely not! And don’t take it for granted either. Sleeping is essential for our survival, for physical and mental well-being. If you have the misfortune of something disrupting your sleeping habits—a new baby, a puppy or a noisy neighbor—you will learn this the hard way. Loss of sleep quickly accumulates, creating a sleep debt. Our bodies will always pressure us to pay back that debt, because we are programmed to sleep.

Our sleep is regulated by two interacting systems: circadian rhythms and sleep/wake homeostasis. Circadian rhythm is an internal biological clock with a 24-hour cycle that regulates the timing of sleep, so we feel sleepy at night and awake during the day. Homeostasis is another natural process by which our urge to sleep increases steadily during the day, from the lowest in the morning to the highest at night. At this point, reinforced by the circadian clock that signals it is time to sleep, we finally rest. 

During the night our sleep goes through different stages. While it was previously believed our body basically “turned off” while we slept, medical advances allowed scientists to discover a pattern in brain activity. Two main types of sleep were thus identified:

  • Rapid Eye Movement (REM) sleep is also known as active sleep because our brain is highly active during this phase. In this state we have vivid dreams, which we can usually remember if awakened. During REM sleep our eyes move, but the muscles in our arms and legs are temporarily paralyzed to prevent us from moving in response to our dreams, as explained by the Division of Sleep Medicine at Harvard Medical School.

  • Non-Rapid Eye Movement (NREM) sleep is also referred to as deep sleep, a stage during which brain waves are more synchronized and our eyes are still. Though muscles are not paralyzed during NREM sleep, their activity is low. This stage is further divided into three consecutive states as sleep becomes heavier, making it increasingly difficult to awaken the sleeping person.

REM and NREM sleep alternate through the night in what is thought to be the best way for our body and mind to recover. Body temperature and blood pressure drop sightly, and breathing patterns change while we sleep. But some physiological activity increases during these hours, like that related to cell repair and growth, with a higher release of growth hormone when sleeping. Sleep deprivation is known to affect our genes and can cause weight gain when, in the absence of restorative sleep, we turn to food for energy. While scientists do not know exactly why we need to sleep, experiments in animals show sleep deprivation will lead to death in a matter of weeks.

Read Related: You Need More Sleep

So how much sleep do we need? More than any other factor it depends on age, being especially important for children’s physical and mental development.

  • Newborns may sleep up to 18 hours spread throughout the day and wake only for feeding and changing. They have equal periods of REM and NREM sleep, and it is normal for them to seem restless, twitching and smiling.

  • Infants from 3 to 11 months begin to have more regular sleeping habits, as circadian rhythms take time to develop but are generally consolidated by six months of age. Infants may sleep some 12 hours during the night and take several naps during the day. A security blanket or toy can be helpful from this age on.

  • Toddlers generally sleep 12 hours at night and still need a long daytime nap lasting one to three hours. Toddler’s greater independence and mobility may lead to sleep problems, according to the National Sleep Foundation. Daytime sleepiness and behavioral problems may be a sign the child is not getting enough sleep. By this age, REM sleep is now down to 20% to 25% and remains constant through adulthood.

A regular and consistent bedtime routine should be established early on, to prevent sleep problems that may lead to poor performance in school and to behavioral issues. It is easy for older children to get caught up in after-school activities, computer games or TV shows that may rob them of necessary sleep time.

  • Preschoolers sleep up to 13 hours a day and some still nap for an hour after lunch. Nightmares, night terrors and sleepwalking are common during these years. Ideally children should acquire good sleeping habits—including falling asleep on their own—by age 5.

  • Children between 6 to 12 years of age still require up to 11 hours of sleep, but it generally becomes increasingly difficult to meet these needs. School-aged children tend to resist going to bed and may experience difficulty falling asleep, aggravated by caffeine consumption in older kids. 

Teenagers are not young adults as far as sleep needs are concerned. However, both teens and adults tend to be sleep deprived, which affects their general performance and can make them into dangerous drivers behind the wheel.

  • Teens need an estimated 8½ to 9¼ hours of shuteye, but their internal clock conflicts with school hours because the timing of sleep changes at the onset of puberty. During adolescence, circadian rhythms experience a delay, so it is natural for teens to stay up late and have trouble waking up in the morning. While lack of sufficient sleep is linked to depression in teenagers, typical moodiness may be the first sign of sleep deprivation, says Cleveland Clinic.

  • Adults generally require 8 hours of sleep at night, though anything from 6 to 9 hours is considered normal. Genetics determine how much sleep we need and if we are a morning person or a night owl. When our circadian clock runs faster than 24 hours, we tend to be more alert in the morning; when the clock runs slower, we are more alert at night. In adulthood the duration of deep sleep starts to decline, with sleep becoming lighter as we age. It is estimated as many as 7 out of 10 adults experience some type of sleep problem, while chronic medical conditions greatly interfere with restorative sleep in the elderly.