Mammalian sleep varies widely, ranging from frequent napping in rodents to consolidated blocks in primates and unihemispheric sleep in cetaceans. In humans, rats, mice and cats, sleep patterns are orchestrated by homeostatic and circadian drives to the sleep-wake switch, but it is not known whether this system is ubiquitous among mammals. Here, changes of just two parameters in a recent quantitative model of this switch are shown to reproduce typical sleep patterns for 17 species across 7 orders. Furthermore, the parameter variations are found to be consistent with the assumptions that homeostatic production and clearance scale as brain volume and surface area, respectively. Modeling an additional inhibitory connection between sleep-active neuronal populations on opposite sides of the brain generates unihemispheric sleep, providing a testable hypothetical mechanism for this poorly understood phenomenon. Neuromodulation of this connection alone is shown to account for the ability of fur seals to transition between bihemispheric sleep on land and unihemispheric sleep in water. Determining what aspects of mammalian sleep patterns can be explained within a single framework, and are thus universal, is essential to understanding the evolution and function of mammalian sleep. This is the first demonstration of a single model reproducing sleep patterns for multiple different species. These wide-ranging findings suggest that the core physiological mechanisms controlling sleep are common to many mammalian orders, with slight evolutionary modifications accounting for interspecies differences.