All of these answers for why we sleep - garbage collection in brain processes, energy recovery - beg the question, why do these processes HAVE to happen during sleep, instead of during wakefulness.<p>I suspect that it's an artifact of the Earth having a day-night cycle at all. Imagine the very first organisms on earth. One is always wakeful, and spends all of its awake time hunting for food. During the earth's night cycle, hunting for food is harder - it's colder, so smell molecules travel more slowly. It's darker, so you can't see food as well. The organism has to work harder to gain the same calories compared to during the day. If there's another organism that goes into a low-energy state during the night, it exchanges the risk of being killed for food during the night with the lower energy budget of not needing to be active at night. Even if a particular organism gets eaten, it's a net positive for the species, and these organisms can outcompete the wakeful organisms.<p>Then, as sleepfulness becomes part of the successful energy budget of early organisms, you can further optimise nighttime activities - organisms that do brain garbage collecting during the night can do so more efficiently than organisms that also sleep but do continuous garbage collecting. Because sleep was the optimal strategy for primitive organisms, fitting recovery into sleep becomes selectively chosen for.<p>The only way to prove this, though, would to find a planet that has no day/night cycle, and see if those organisms have any sleep behavior.