From an evolutionary standpoint, sleep seems like a terrible idea. Every night, we willingly surrender consciousness, mobility, and vigilance—leaving ourselves vulnerable to predators, accidents, and the elements. And yet sleep, which is essentially universal across the animal kingdom, is unavoidable. But it turns out that sleep is not a passive state at all. Instead, it’s a critical time when the brain performs one of its most important jobs: cleaning itself.