Methodology
Process C and Process S: The Two Clocks Behind Your Day
Two independent processes decide how alert you are at any hour: pressure that builds the longer you are awake, and a rhythm that runs on its own 24-hour clock regardless. Here is how each is computed.
What is the two-process model of sleep regulation?
Proposed by Borbély in 1982, it explains alertness as the interaction of two independent systems: Process S, homeostatic sleep pressure that rises during wake and dissipates during sleep, and Process C, a circadian rhythm that oscillates on roughly 24 hours regardless of how long you have been awake.
It is the reason a second wind at 10pm is real rather than imagined. Sleep pressure has been climbing all day, but the circadian signal is also near its evening alerting peak, and the two partially cancel. It is equally the reason 3am feels catastrophic even after a nap: pressure may be lower, but the circadian trough is at its deepest.
The model has been repeatedly refined rather than replaced — Borbély and colleagues published a full reappraisal in 2016 that still holds the two-process structure at its core.
Sources
- Borbély, A. A. (1982). A two process model of sleep regulation. — Human Neurobiology
- Borbély, Daan, Wirz-Justice & Deboer (2016). The two-process model of sleep regulation: a reappraisal. — Journal of Sleep Research
How is sleep pressure (Process S) calculated?
Pressure rises toward an asymptote on a 15-hour time constant while you are awake and dissipates on a 4.2-hour constant while you sleep, with a floor of 0.05. The formula is pressure = residual + (asymptote − residual) × (1 − exp(−hours awake ÷ 15)).
The asymptote is not fixed. It is raised by two things: a rolling seven-day sleep debt, which increases the residual pressure carried into each new day, and irregular bedtimes, which raise the ceiling the accumulation climbs toward.
Dissipation is much faster than accumulation — 4.2 hours against 15 — which is why a single good night recovers most of a deficit while a single short night does comparatively little damage. Chronic restriction is the pattern that does damage, because the residual never fully clears.
How does MaxDex measure bedtime consistency?
With a bedtime consistency index, BCI7 = exp(−σ), where σ is the circular standard deviation of your recent sleep-onset times. It returns 1.0 for perfectly regular bedtimes and falls toward 0 as they scatter.
Clock times need circular statistics, not ordinary ones. The naive average of 23:00 and 01:00 is noon, which is nonsense. The engine computes a mean resultant length across the times as angles and derives the spread from it, so midnight-crossing schedules behave correctly.
Consistency is not a cosmetic metric here — it feeds the score in two places. It raises the pressure asymptote when irregular, and it contributes a direct bonus or penalty to the sleep score. Phillips and colleagues found irregular sleep-wake patterns predicted worse academic performance and delayed circadian timing even when total sleep duration was held constant, which is the finding this weighting reflects.
Why does the circadian curve peak at 4pm?
The circadian driver is a 24-hour cosine with its alertness peak at 16:00 and its trough near 04:00, plus a Gaussian post-lunch dip centred at 14:30 with a width of 1.6 hours and a depth of 0.28. The whole curve then shifts by your chronotype phase.
The post-lunch dip is modelled separately from the main cosine because it is a genuinely separate phenomenon. It appears even without lunch, which is why it is drawn as a circadian feature rather than folded into the meal model — though eating does deepen it, and that interaction is handled in the metabolic driver.
The source describes this cosine as a deliberately cheap stand-in for a Van der Pol limit-cycle oscillator. A full oscillator model needs light-exposure history that a phone cannot reliably supply, so we use the tractable approximation and say so.
Sources
- Monk, T. H. (2005). The post-lunch dip in performance. — Clinics in Sports Medicine
- Borbély, Daan, Wirz-Justice & Deboer (2016). The two-process model of sleep regulation: a reappraisal. — Journal of Sleep Research
How does MaxDex work out my chronotype?
From the circular mean of your sleep midpoints over the past 14 to 21 days, referenced against a neutral midpoint of 03:30. The resulting phase shift is clamped to ±12 hours, so night-shift workers and day sleepers are handled rather than treated as errors.
Sleep midpoint is the standard behavioural marker of chronotype in the research literature — it is the basis of Roenneberg’s Munich ChronoType Questionnaire, which established mid-sleep on free days as a practical proxy for internal circadian phase across very large populations.
Using observed midpoints rather than a questionnaire means the estimate updates as your schedule genuinely changes, instead of freezing whatever you answered during onboarding.
Sources
- Roenneberg, Wirz-Justice & Merrow (2003). Life between clocks: daily temporal patterns of human chronotypes. — Journal of Biological Rhythms
How is sleep inertia handled?
As an exponential decay from the moment you wake: 1.2 × exp(−hours since wake ÷ 0.9). It is strongest immediately on waking and has largely dissipated within about two hours.
Sleep inertia is a distinct state from ordinary tiredness, with its own well-documented time course of impaired alertness and decision-making after waking. Modelling it separately is what stops the app scheduling your hardest cognitive work into the first thirty minutes of the day just because sleep pressure happens to be at its daily minimum then.
Sources
- Tassi, P. & Muzet, A. (2000). Sleep inertia. — Sleep Medicine Reviews
Frequently asked questions
Why do I crash at 2pm even when I sleep well?
How many days of data before the chronotype estimate is useful?
Does MaxDex handle night shift work?
What is sleep debt and how is it calculated here?
Can I recover sleep debt by sleeping in at the weekend?
Why does bedtime consistency matter if I get enough hours?
Last reviewed August 28, 2026 by the MaxDex Services team. How we research and review this.