Somewhere I've heard a cool idea that sleep might be the "default" state of the living organisms. Most of the time you want to rest and conserve energy, so sleeping is just how we are, it's waking up to get food and procreate is the "strange" thing we do.
No idea if this makes sense scientifically, but it's fun to think about.
Or maybe animals that walk around during the time when there's no light just get themselves into trouble more often and end up dying out of the gene pool. Might as well shut down during the dangerous time and use it for repair.