The reason why we sleep remains one of the most elusive mysteries in science. Theories abound, but the fact is that little is known about what genetic or molecular forces drive the need to sleep, and we still don't know exactly why sleep is necessary for our physical and mental health.

One clue, however, is the fact that sleeping seems to be closely tied with our immune system function. For instance, we know that the drive to sleep strengthens when we're sick, and getting quality sleep is correlated with both quicker healing and infection prevention.

Now for the first time, scientists from the Perelman School of Medicine at the University of Pennsylvania have discovered a link between sleep and our immune systems that might begin to offer real answers to some of our deepest questions about sleep, reports MedicalXpress.com.

All hail the nemuri

They have identified a single gene, known as nemuri, that both controls the need for sleep and also generates a protein with strong antimicrobial powers that might play a major role in fighting infection.

"While it's a common notion that sleep and healing are tightly related, our study directly links sleep to the immune system and provides a potential explanation for how sleep increases during sickness," said senior author Amita Sehgal.

They discovered that nemuri's immune-boosting protein only secretes from our brain cells in the aftermath of an infection during deep, prolonged sleep. This, tied with the fact that nemuri is also responsible for increasing our need for sleep in the first place illustrates a closed-loop relationship between sleep and immune response.

"The nemuri protein is a genuine driver of keeping sleep on track under conditions of high sleep need like when we're sick," said first author Hirofumi Toda, a postdoctoral fellow in Sehgal's lab.

The study, which was performed exclusively on fruit flies, looked at how the quality of sleep and the survivability of infected flies was affected by the nemuri gene. Flies without the gene were more easily aroused during daily sleep, and their acute need for an increase in sleep — induced by sleep deprivation or infection — was reduced. These flies also died of their infections more often than flies with the gene.

Researchers also studied a subset of flies that had their nemuri gene over-stimulated, and found that these flies had the highest rate of survivability of all. They also snoozed the soundest.

While further research will be needed to see whether these same correlations and pathways can be observed in human subjects, the nemuri gene is also present in us, and its functionality when it comes to sleep is likely widespread across the animal kingdom. After all, almost all animals share the need for sleep.

"In the next phase of our work, we plan to investigate the mechanism by which NEMURI drives sleep," said Toda.

In the meantime, make sure to get plenty of sleep when you're sick. The evidence continues to stack up that our immune systems need sleep to function at their best, and now we're finally beginning to understand why.

Bryan Nelson ( @@brynelson ) writes about everything from environmental problems here on Earth to big questions in space.

Why sleeping helps you heal when you're sick
A single gene, known as nemuri, controls the need for sleep and also generates a protein with strong antimicrobial powers, new study finds.