Sleep is a familiar, periodic occurrence in our lives. Despite its place in everyday experience, the existence of this suspended state of consciousness has intrigued and puzzled philosophers and scientists for decades. For much of its history, sleep science has focused on humans and mammals. In contrast, in the last 20 years or so, it has become increasingly clear that sleep is essentially universal. Sleep states have been observed in animals from mammals to cnidaria. Here, we review recent progress in sleep science through the lens of comparative physiology. We highlight broad insights into sleep phenomenology, physiology and function that have come from this comparative approach. These include the plasticity of sleep in response to environmental challenges and ecological niches, the discovery of distinct sleep stages in diverse taxa and conserved functions of sleep. Indeed, we argue, a comparative approach is essential to any comprehensive account of sleep.