Researchers from Max Planck Institute for Evolutionary Anthropology in Leipzig, Germany have found that animals that sleep longer do not suffer from parasite infestation.
They hope that the research may have implications for human health.
"Sleep is a biological enigma. Despite occupying much of an animal's life, and having been scrutinized by numerous experimental studies, there is still no consensus on its function," lead researcher Brian Preston said.
"Similarly, nobody has yet explained why species have evolved such marked variation in their sleep requirements (from 3 to 20 hours a day in mammals).
"Our research provides new evidence that sleep plays an important role in protecting animals from parasitic infection," he added.
During the study, the researchers showed that evolutionary increases in mammalian sleep durations are strongly associated with the number of circulating immune cells.
And mammalian species that sleep for longer periods also have substantially reduced levels of parasitic infection.
"We suggest that sleep fuels the immune system. While awake, animals must be ready to meet multiple demands on a limited energy supply, including the need to search for food, acquire mates, and provide parental care," he said.
"When asleep, animals largely avoid these costly activities, and can thus allocate resources to the body's natural defenses."
"Given the declines in human sleep durations that have occurred over the past few decades, there is a clear need for studies that further clarify the immunological significance of sleep," he added.
The study has been published in the open-access journal BMC Evolutionary Biology.