Despite being a prominent aspect of animal life, sleep and its functions remain poorly understood. As with any biological process, the functions of sleep can only be fully understood when examined in the ecological context in which they evolved. Owing to technological constraints, until recently, sleep has primarily been examined in the artificial laboratory environment. However, new tools are enabling researchers to study sleep behaviour and neurophysiology in the wild. Here, we summarize the various methods that have enabled sleep researchers to go wild, their strengths and weaknesses, and the discoveries resulting from these first steps outside the laboratory. The initial studies to 'go wild' have revealed a wealth of interindividual variation in sleep, and shown that sleep duration is not even fixed within an individual, but instead varies in response to an assortment of ecological demands. Determining the costs and benefits of this inter- and intraindividual variation in sleep may reveal clues to the functions of sleep. Perhaps the greatest surprise from these initial studies is that the reduction in neurobehavioural performance resulting from sleep loss demonstrated in the laboratory is not an obligatory outcome of reduced sleep in the wild.This article is part of the themed issue 'Wild clocks: integrating chronobiology and ecology to understand timekeeping in free-living animals'.