Experts advise that adults should sleep for around eight uninterrupted hours in a cool, dark room. If you do so consistently, they say, you can add years to your life.

It’s an ideal many people fail to live up to. It’s also, according to “The Sleepless Ape: The Story of Sleep in Human Evolution,” which published May 19, not how humans have slept for most of our evolutionary history.

Anthropologist David Samson, the book’s author and an associate professor at the University of Toronto, has scaled trees to study chimpanzee beds and visited remote tribes to understand how the story of human sleep unfolded.

Samson’s findings reveal how human sleep patterns became shorter, deeper and more flexible than those of our more ape-like ancestors, freeing time to spend on toolmaking, social interactions and migration around the world.

He argues that these unique sleep habits fostered survival, innovation and shaped our species’ behavior in pivotal ways. Today’s sleep-deprived humans can also learn a great deal from how our ancestors used to sleep, he adds.