Sleep is essential to cognitive function and health in humans, yet the ultimate reasons for sleep-i.e. 'why' sleep evolved-remain mysterious. We integrate findings from human sleep studies, the ethnographic record, and the ecology and evolution of mammalia