Sleep is when the brain does its housekeeping, consolidating memories and clearing away debris. Even grownups need naps, and of course, babies need it too.

Infants nap off and on throughout the day in multiple bouts of sleep. Gradually these give way to two naps and then one nap a day in toddlers and preschoolers. Eventually, schoolage children need no nap at all — though some kindergartners will still need a nap.

Parents concerned about their child’s nap schedule — or lack of it — may be relieved to know that their child’s timetable for transitioning away from a daily nap may have less to do with their age than their brain development.

Though it may give parents of kids who stop taking naps at a young age some comfort, the theory in no way diminishes the importance of naps and giving young children the opportunity to nap.

Memories are stored in the hippocampus in the short-term before they move to long-term storage in the cortex. Napping allows memories to move to the cortex where they become part of long-term memory, freeing space for more information to be stored in the hippocampus.

“There’s a difference in the development of the hippocampus for kids who nap and those who have transitioned out of naps,” lead author, Rebecca Spencer, a professor in the Department of Psychological and Brain Sciences at the University of Massachusetts Amherst, said in a statement. She and Tracy Riggins, a child psychologist specializing in memory development at the University of Maryland, coauthored a recently published a Perspective in PNAS, the Proceedings of the National Academy of Science.

“The naps are serving the job of processing memories,” Spencer explained. When the immature hippocampus reaches its limit of short-term memories that can be stored without forgetting, children feel the need to sleep. But, according to their theory, the hippocampus develops at different rates in different children.

When the hippocampus is immature, “it’s like having a small bucket,” Spencer added. “Your bucket is going to fill up faster and overflow, and some memories will spill out and be forgotten. That’s what we think happens with the kids that are still napping. Their hippocampus is less mature, and they need to empty that bucket more frequently.”

A child feels the need to sleep when their hippocampus becomes as full of memories as it can store. The team used an EEG to measure this “sleep pressure,” monitoring the buildup of slow-wave activity, a neurobiological marker in the brain waves, during sleep.

As the hippocampus is more developed and can hold memories longer without the need for sleep, the researchers’ posit that kids begin to nap less, allowing information in the hippocampus to move to the cortex during overnight sleep. In seniors, naps serve a different purpose. They seem to help the brain clear the cellular debris that can lead to Alzheimer’s.

The theory in no way diminishes the importance of naps and giving young children the opportunity to nap, though it may give parents of kids who stop taking naps at a young age some comfort. “Some [kids] still need it; others may not need it but if they take it,” Spencer says, “we know that it’s going to benefit their learning, and we know that learning is what underlies early education.”