Along with language use and our ability to walk upright, there’s one other key trait that sets humans apart from other primates: our sleeping patterns. The average adult human sleeps only about seven hours each night, compared to the average of 17 hours among some of our primate cousins. A new study may have found the evolutionary explanation for such short short sleep times. Moreover, it further proves that, for humans, quality of sleep is more important than quantity.

For their study, Drs. David R. Samson and Charles L. Nunn, from Duke University in North Carolina, analyzed the sleep patterns of hundreds of mammals, including 21 primate species. In doing so, they found that humans sleep far less than any other primate. But while humans sleep for less hours, our sleep quality is far better when compared to the other mammals tested. A larger proportion of humans’ time sleeping, they found, was spent in REM (rapid eye movement) sleep rather than non-REM sleep. REM sleep is a period of deep, restorative sleep during which memories are stored. With longer REM sleep, we boost creative thinking, improve learning ability, and feel more well-rested.

Showing that humans had shorter, yet more efficient, sleep patterns was only the first part of the study. The team also had to explain why this difference existed. Research has long suggested artificial lighting from electronic devices may have led to the shortening of our natural sleep patterns, but the team believed these short sleep habits existed before the advent of electricity. In fact, a study released earlier this year showed indigenous populations that had never been exposed to artificial lights still had short sleep habits. So what was it that led humans to develop today’s sleeping habits?

The duo believes the transition occurred close to the time humans went from sleeping in trees to the ground. According to their Sleep Intensity Hypothesis, sleeping on the ground prevented early humans from the danger of falling out of trees. It also allowed them to rest close together in groups next to fires. This protected them from many predators, which in turn gave them the safety to sleep more deeply and eventually develop shorter, more efficient sleeping patterns. This also gave early humans the time to learn new skills and create stronger social bonds. Those who inherited short-sleeping genes likely picked up on these additional skills, which then passed on through the generations.

Of course, Samson and Nunn are not the first to suggest sleep quality is more important than quantity in humans. While it’s a common belief the average person needs between seven and eight hours of sleep each night, the reality is everyone is different, Dr. Andrew J. Westwood , assistant professor in the Clinical Neurology Division of Epilepsy and Sleep Disorders at Columbia University Medical Center, told Medical Daily in a November 2014 interview. He said we shouldn’t stress over meeting a universal quota.

“If you feel fine and can function well during the day on three hours of sleep,” Westwood said, “then you don’t need to worry.”

Source: Samson DR, Nunn CL. Sleep Intensity and the Evolution of Human Cognition. Evolutionary Anthropology. 2015.