Sleep experts have long believed that before we had electric lights and smartphones to keep us up at all hours of the night, people got much more sleep. But after spending several years collecting data on the sleep habits of modern hunter-gatherer tribes in Africa and South America, a team of sleep scientists found that people living a pre-industrial lifestyle got less than the seven to nine hours experts usually prescribe.

“People like to complain that modern life is ruining sleep, but they’re just saying: Kids today!” Jerome Siegel, who led the study, tells Ed Yong for The Atlantic. “It’s a perennial complaint but you need data to know if it’s true.”

Siegel now has that data, but the story is not what you might expect. People living in modern hunter-gatherer tribes in Tanzania, Namibia and Bolivia not only stay up long after sunset, but only get an average of 6.5 hours of uninterrupted sleep each night.

"I feel a lot less insecure about my own sleep habits after having found the trends we see here," co-author Gandhi Yetish says in a statement.

But how do we know this applies to our ancestors? We don't exactly, but it is a good guess. Historic sleep data is hard to come by and the gadgets that experts use to track the length and quality of sleep were only invented during the last 50 years. Accurate and unobtrusive devices only came about in roughly the last 10 years, Yong writes. So there isn't a direct way for researchers to study pre-industrial sleep patterns beyond modern hunter-gatherer communities.

Let's not be hasty: Sleep is important. Studies show that even losing a few hours of sleep a night can lead to heart disease and depression, while extreme lack of sleep can cause hallucinations and psychosis. But electronics may not be the only thing disrupting sleep.

Even though the hunter-gatherers slept less, their daily rhythms were not identical to those of people living in modern societies. While the three groups often went to sleep after sunset, they woke long before first light. They also stuck to a regular sleep pattern, waking-up at the same time from day-to-day.

It turns out temperature is also important. People from all three groups fell asleep as the night grew colder and woke up when it was coldest out. Temperature may be one of the oldest evolutionary signals that help regulate our sleep patterns, neuroscientist Eus van Sommeren tells Yong. But modern lifestyles, complete with shelters and heating systems, have at least in part eliminated these temperature rhythms, van Sommeren tells Yong.

So to get a better night’s sleep, it might be best to turn down the thermostat and set an early alarm.