New insight into the weirdly wonderful state of sleep suggests that when brains are in snooze mode, certain neural connections are partially weakened, rested, and reset. However, this only happens for the first few hours of sleep.

The team behind this new research from University College London in the UK says it further supports the synaptic homeostasis hypothesis – that sleep is an important reset mechanism for the brain's overall health.

"While the function of sleep remains mysterious, it may be serving as an offline period when those connections can be weakened across the brain, in preparation for us to learn new things the following day," says biologist Jason Rihel.

Rihel, along with neuroscientist Anya Suppermpool and colleagues, studied the synapse activity of zebrafish, whose brains are relatively easy to observe and analyze, over several sleep/wake cycles.

By imaging single neurons, the researchers saw that they gained more connections during waking hours, and lost them during sleep.

This weakening of brain connections is actually a healthy process: these neural links get stronger as we go about our day, and if there wasn't some kind of dialing down overnight, there wouldn't be any capacity to learn and absorb during the next day.

The longer the zebrafish were kept awake, the more connections they built up, and the more were lost when they could finally sleep. It seems there's a relationship between 'sleep pressure' and the effectiveness of the reset process.

"If the patterns we observed hold true in humans, our findings suggest that this remodeling of synapses might be less effective during a midday nap, when sleep pressure is still low, rather than at night, when we really need the sleep," says Rihel.

Studies like this are hugely useful for scientists looking to understand how sleep works, and why we need it. It's clearly essential to our health – as we can see from the negative effects on the body when we don't get the sleep we need.

Experts think sleep may play an important role in consolidating memories, but another hypothesis that sleep helps clear out waste from the brain has recently been challenged.

Delving into the sleeping mind remains difficult – the land of dreams is a place that even our most advanced technologies still struggle to peer into.

The new study raises the question of what's going on in the second half of the night, and further research might be able to provide an answer.

"There are other theories around sleep being a time for clearance of waste in the brain, or repair for damaged cells," says Suppermpool. "Perhaps other functions kick in for the second half of the night."

The research has been published in Nature.