Mathematics of Sleep

Quantification of sleep is not an easy task – too many variables are involved in inducing and regulating this process. In best attempts to answer as many questions as possible, specialists have come up with a number of theories and models.

Written by:


, Sleep Researcher
Last Updated: Sun, October 6, 2019
Fact checked by:

Marko Jevtic

, Sleep Specialist

Sleep is a naturally occurring, dynamical process that affects our body and mind, our natural developmental changes, and fluctuations in our daily state. We instinctively sleep almost every night of our lives, but there’s a lot more to sleep than making yourself comfortable and closing your eyes. As sleep science still experiences the surge of information since the landmark discoveries made over the last few decades in this area, progress has certainly been made; knowing that sleep happens doesn’t automatically explain why and how exactly.

Quantification of sleep is not an easy task – too many variables are involved in inducing and regulating this process, and as far as it lead us already, sleep science is still very much in its infancy. In best attempts to answer as many questions posited when faced with this problem, specialists have come up with a number of theories and models.

In this article, we will explore some of these models one by one, observations about them, as well as some newer and promising work.


A Mathematical Model of the Sleep-Wake Cycle

This model works around the “flip-flop” models previously posited to account for REM/NREM stages of sleep and explores how well the neuronal components in these models fit in the sleep-wake cycle as we know it. It is essentially the biological basis for the two-process model and explains features like the timing of wakefulness and sleep, how deprivation affects this timing, the effects of orexin loss, ultradian rhythms and more.


Two-Process Model of Sleep Regulation

The two-process model is one of the most authoritative sleep posits to date. It describes what happens in one’s body during the 24-hour timespan and why we get sleepy or alert at different stages of the day. The processes in question are the circadian rhythm (also known as process C) and the sleep-wake homeostasis (process S). These two combined regulate our sleep and wake times of a single day.

Circadian rhythms in one’s body are in charge of monitoring other processes and time them to match the external time of day. One such circadian rhythm is meant to synchronize our sleep time with nighttime and our wake time with daytime, triggered by external cues like light levels. In essence, process C is what alerts you to wake up in the morning, keeps you awake throughout the day, and then lets you sleep in the evening.

Homeostatic processes are those in charge of monitoring a specific function in our body in narrow-range. A homeostatic process regulates the blood salinity levels; another one takes care of thermoregulation, and so forth. The sleep-wake homeostasis is responsible for the increasing sleepiness we feel the longer we are awake, making our bodies and minds slower and heavier until we finally go to sleep. This process increases the sleep pressure over the day, but goes into decline when we sleep (specifically in non-REM stages of sleep).

Brought together, these processes overlap and override one another constantly to enable sufficient sleep. In essence, it works like this: the morning, after a bit of sobering up from sleep, is when we are most alert. Process S has just begun the sleep debt build-up which will only go upwards until the next time we sleep. In order to prevent us from succumbing to this pressure, Process C keeps us alert, so that we would stick to the schedule and stay awake until nightfall. With nightfall, our brain will start secreting some sleep-inducing hormones like melatonin, and the sleep-wake homeostasis will finally be in the clear to take over. As we fall asleep, this process will be satiated, releasing the sleep pressure until the moment we wake up, once again alerted by process C, and the whole story repeats from the top.

The two components mentioned in this model function together and can’t be looked at independently. Disrupt one of them, and you automatically have disrupted sleep with common consequences like excessive daytime sleepiness and sleep deprivation after as little as a couple of nights. If continued for a longer timespan, one might develop a disorder. Examples of disorders triggered by environmental or behavioral factors would be the circadian rhythm disorders like jet lag, shift work, delayed or advanced sleep-wake phase disorder and insomnias. This mostly happens when light exposure is insufficient, or one’s internal clock is forcefully opposed to the time of day (like when you switch timezones suddenly).

As it is, the two-process model is a useful tool for the initial outlining of sleep architecture, but its simplistic nature has some shortcomings. Namely, the stages of sleep including 1, 2 and Slow Wave Sleep (SWS) are all molded into “non-REM” besides REM-sleep and aren’t differentiated between one another. This is important because both different stage durations and the frequency of switching between stages of sleep can potentially signal that something isn’t right and might indicate a disorder, sleep-related or otherwise.


Sleep Architecture and the Bayesian Network

Because of the reasons stated above, sleep researchers have decided to go a bit further into sleep mathematics, although while relying on the two-process model as a base. Using the Bayesian network and information based on around 3200 nights of sleep from different sources, researchers were able to lay the ground for a newer, updated model of sleep to come. Before we get into it, we will clarify some terminology and basic sleep structure.

Bayesian network is a statistical model that uses conditional dependency between a set of variables and an outcome, to determine which variable was more likely to cause the outcome and predict future events based on this information. For example, we could have a set of symptoms and predict the likelihood of various diseases or disorders using this network. For our purposes, different sleep stages and their dynamics, as well as factors like one’s body weight, age, sex and external factors like time of day could all be proved to affect sleep using the Bayesian network.

Different sleep stages are as following: stage 1, stage 2 (light stages), Slow Wave Sleep (SWS), Rapid Eye Movement (REM) and Waking After Sleep Onset (WASO). The standard order of these includes stage one proceeding into a cyclic repetition of stage 2, SWS, stage 2 and REM. The first two stages have shown to be mostly consistent in duration for the entire night (meaning, they last the same as the first time they occurred every next time as well), while SWS and REM phases have bigger fluctuations. Typically, SWS will take a larger portion of sleep in the evening or night, while REM will occur and last longer in the early morning hours. During the night, brief moments of WASO will occur somewhere between the other stages.

Doctors and researchers will often take the total time one has spent in each stage during sleep and normalize it into an average in order to compare the stages and measure their proportions during a night’s sleep. This can be beneficial on occasions when multiple patients or groups are examined. However, in an individual, it fails in noting whether some stages re-appeared more times but lasted shorter, or they cycled less but for longer durations. Differentiating between these situations is very important, as fragmented sleep can indicate the possibility of obstructive sleep apnea, for instance. Another issue with this approach is that researchers won’t be able to tell if any single stage was consistent in duration or not. For example, a stage could occur only two or three times during sleep but last equally long each time, or it could occur more times but last for shorter or longer periods in every appearance, with the total sum of time spent in that stage staying the same.

To effectively predict the probability of the next stage transition, its duration, total sleep efficiency, and REM onset, researchers have also considered each individual’s age, sex, sleep latency, and its overall length.

Results were able to establish that both age and sex make a difference in sleep stages transition and duration. The older an individual, the more of their sleep goes into stages 1, 2, and WASO, and less time is spent in SWS. Their quality of sleep was also worse compared to that in younger people. People’s sex only changed the transitioning between various stages, but the difference in other aspects wasn’t significant. Finally, a thorough examination was unable to detect any links between sleep latency, efficiency, and one’s BMI.

In conclusion, this work shows some progress has been made since the two-process model and calls for a new, refitted one. The Bayesian network is worthy of mention as a promising tool for further use in studies, and we can expect to see some exciting discoveries in the future of sleep science.


Sleep Related

Was this post helpful?

+ posts

Michael is a professional writer based in Boston and someone who has always been fascinated with the mysteries of sleep. When he’s not reading about new sleep studies and working on our news section, you can find him playing video games or visiting local comic book stores.

Leave a Reply

Your email address will not be published. Required fields are marked *