  There are two contrasting explanations of sleep: as a proximate, essential
physiological function or as an adaptive state of inactivity and these
hypotheses remain widely debated. To investigate the adaptive significance of
sleep, we develop an evolutionary argument formulated as a tractable partial
differential equation model. We allow demographic parameters such as birth and
mortality rates to vary through time in both safe and vulnerable sleeping
environments. From this model we analytically calculate population growth rate
(fitness) for sleeping and non-sleeping strategies. We find that, in a
temporally heterogeneous environment, sleeping always achieves a higher fitness
than not sleeping. As organisms do not exist in constant environments, we
conclude that the evolution of sleep is inevitable.
