According to this theory, sleep was probably “invented” some two hundred million years ago when sea creatures crawled up on the shore. Land dwellers developed the habit of sleeping as a safety measure. During the day they had to be alert and ready to run away from danger. At night they couldn’t be seen, but they could be heard, so the best thing to do was to stay still and quiet and out of the way. The rest would help them to run faster and farther the next day, and while they were resting they also ensured their inconspicuousness by staying asleep.
Everett Mattlin, Sleep Less, Live More, New York, 1979, p. 67-68