There is still a cloud of uncertainty which lingers in our minds even today as to what led to the evolution of sleep. This is a fascinating question, and the honest answer is that no one knows for sure.
At first sight, sleep appears to be incompatible with survival because it prevents feeding and procreation and could expose the sleeper to attack by predators. There have to be some essential benefits to outweigh these serious disadvantages of sleep.
Some theorists have argued that sleep helps to forge new neural connections and solidify memories, whereas others have posited that sleep allows the brain to filter out unimportant connections. It may also help the brain repair itself.
These explanations are not consistently supported by empirical evidence, however, and do not explain why different animals have evolved a wide range of sleep-wake cycles. Some of the theories even contradict one another. Certain animals, such as American black bears and fat-tailed dwarf lemurs, hibernate for days to months, whereas others, especially birds and small mammals, exhibit a milder state of torpor that may last a single night or less. The big brown bat, for example, sleeps for 20 hours a day. In contrast, newborn killer whales and dolphins hardly sleep for weeks if they are born during a migration; the same goes for their mothers.
One plausible explanation for this variation in sleep patterns is that, from an evolutionary perspective, sleep and related states provide periods of adaptive inactivity. Contrary to first impressions, animals may sometimes be less vulnerable to attack by predators while asleep. When an animal is awake and manoeuvring in its environment, it can forage for food, eat and mate, but it will also expend energy by engaging in such behaviors and can wander into harm’s way.
Most likely sleep evolved to ensure that species are not active when they are most vulnerable to predation and when their food supply is scarce. The big brown bat need not be awake for more than four hours a day given that the insects on which it feeds are active only for a few hours each evening. If it were flying around during the day, the bat would more easily attract the attention of predatory birds. Although slumber seems to serve many roles, sleep patterns across species may enhance survival by optimizing the timing of activity and idleness while also allowing us to maintain the most agile brains.
When it comes to humans, scientists believe that duration of sleep could well be related to genetics. Researchers have discovered some evidence that seems to support this assumption. ABCC9 is one gene found which influences the duration of human sleep. It is also theorized that a considerable amount of sleep-related behavior, such as when and how long a person needs to sleep, is regulated by genetics. Ideal sleeping hours for adults is said to be between 8 to 9.5 hours. We can conclude that the main purpose of sleep is to relax our muscles as well as limit the perception of environmental stimuli.
But ultimately the fact of life is that you’ll sleep before you die. Your body will shut down and MAKE you sleep.