Math of sleep

Nerds love a good mathematical analysis and a good model.

If there are plenty of mysteries of sleep – we don’t know why the brain switches between different stages of sleep, maybe we can at least show a mathematical description of, when the stages change. Whether or not we accept theories like the flip-flop switch, we might at least be able to fit transitions to a model.

The two-phase model is explicitly mathematical and while it may not perfectly describe sleep cycles, it is close enough to offer insights and some predictions.

A perfect mathematical model would account for observed circadian and homeostatic processes and also would show why small mammals adopt polyphasic sleep patterns while healthy human sleep is monophasic.

An early descriptive model

Here’s another thing quantitative biologists found: the length of waking periods fit a power law distribution:: “the log of probability of a bout of a certain length and the log of the bout length forming a linear relationship” This is a “scale-invariant” property of the sleep-wake timing pattern and it seems to be true across different species of mammals.

The length of sleep periods follows an exponential distribution. This is more evident in explicitly polyphasic animals like rodents, but if you break down the sleep period in humans the right way – NREM and REM periods – you can make it fit. The means the length of sleep periods scales as exp(–t/τ) where observations have identified the time scale τ = 22.0 ± 3.0 min for humans.

The wake episode distribution in humans allowed to sleep and wake at will (no social pressure to go to work, etc.) varies as t^–α , where the exponent value of α = 2.3 ± 0.3 (See

This is all very exciting stuff and even if it doesn’t explain sleep it provides some indication of a deep structure and network effects inside the human body.

More models

Some Dutch physiologists fit a Markov Chain model to the hypnograms of sleep stage transitions during the night. The model combines deterministic and stochastic elements and fits the description of stages over time.

Researchers at Ohio State developed a mathematical model of the sleep/wake cycle. The paper is behind a paywall, but the abstract says the model is based on the flip-flop switching theory between sleep and wake and between REM and NREM. The model reportedly accounts for ultradian rhythms in the body and circadian cycles and fits with the 2-phase model.

Physiological Truths

The Daily Mail published an article about an attempt to create an equation to predict sleep quality: We don’t give this much credence. It was sponsored by a bedding company and uses too many vague and subjective independent variables to be useful And when you look at the factors, many just reflect common sense and the principles of sleep hygiene.

Physiology involves analysis of bodies as engineering systems, and like engineers physiologists love nothing more than a mathematical model. For instance, some scientists have modeled the frequency of blinking as a Markov chain. Biologists are always looking for math in nature. Animals and plants experience daily circadian cycles and many animals have cycles involving tidal cycles. Such infradian rhythms even show up in humans (e.g the menstrual cycle) and in the future scientists may find long-term cycles related to sleep that might explain differences in sleeping times between winter and summer.

The Sleepdex book is now available on

Click here