Sleep is essential for brain function in a surprisingly diverse set of ways. In the short term, lack of sleep leads to impaired memory and attention; in the longer term, it produces neurological dysfunction or even death. I discuss recent advances in understanding how sleep maintains the physiological health of the brain through interconnected systems of neuronal activity and fluid flow. The neural dynamics that appear during sleep are intrinsically coupled to its consequences for blood flow, cerebrospinal fluid dynamics, and waste clearance. Recognizing these linked causes and consequences of sleep has shed new light on why sleep is important for such disparate aspects of brain function.