Carl Sagan said this quote

The sleeping style of each organism is exquisitelyadapted to the ecology of the animal. It is conceivable that animals who are too stupid to be quiet on their own initiative are, during periods of high risk, immobilized by the implacable arm of sleep.