For a long time, sleep was seen simply as rest: a period in which the body and the brain switched off to save energy. Research over the last few decades has changed that view. We now know that the brain is remarkably active during sleep, and that several processes essential to health take place mainly, or only, while we are asleep.
One of the best understood is the consolidation of memory. During deep sleep, the brain appears to replay the experiences of the day and to transfer important information from short-term to long-term storage. Students who sleep after learning remember more than those who stay awake for the same length of time, which is why an all-night revision session before an exam can do more harm than good.
Sleep also seems to help the brain clean itself. Studies in mice have shown that the space between brain cells widens during sleep, allowing fluid to wash away waste products that build up during the day. Some scientists believe that poor sleep over many years may contribute to diseases such as Alzheimer's, although this has not yet been proved in humans.
Most adults need between seven and nine hours of sleep a night, but many get far less. Shift workers, new parents and people who use screens late in the evening are particularly at risk. The light from phones and laptops delays the release of melatonin, the hormone that tells the body it is time to sleep. Doctors therefore recommend keeping a regular bedtime and switching off screens at least an hour before going to bed.