About Soja

A circadian rhythm recovery tool built on published sleep science. Not generic bedtime advice.

What Soja does

Soja takes four inputs: what disrupted your sleep, your normal schedule, what actually happened last night, and when you need to function next. It returns a day-by-day plan with exact timing for light exposure, caffeine, melatonin, and your sleep window.

The plan is different for every person and every disruption type. Flying east requires a different protocol than flying west. An all-nighter requires a different approach than a gradual schedule drift. A night owl recovering from jet lag needs different timing than an early bird. Soja generates the right plan for the specific situation.

The science behind it

The circadian clock is not a simple sleep-wake toggle. It is a ~24-hour timing system embedded in virtually every cell, coordinated by the suprachiasmatic nucleus (SCN) in the hypothalamus. The SCN receives direct light input from the retina and broadcasts phase signals to peripheral clocks throughout the body.

The key variable in any recovery protocol is your DLMO — dim-light melatonin onset, the point roughly two hours before your natural sleep time when the pineal gland begins releasing melatonin. DLMO is the most reliable marker of circadian phase. The timing of light exposure, melatonin supplements, and other interventions is calculated relative to DLMO — not to clock time or to when you feel tired.

The circadian clock can advance (shift earlier) at a maximum rate of roughly 1 hour per day under optimal conditions, and can delay (shift later) slightly faster. Any protocol that tries to shift faster than this produces fragmented sleep and poor recovery. Soja’s plans are rate-limited accordingly.

Verified facts

Five specific, sourced claims about the science behind Soja's algorithm. Each links to the primary research it comes from.

  • Low-dose melatonin (0.5mg) shifts the circadian clock as effectively as the 3-10mg doses sold in most pharmacies, with less next-day grogginess — this is the dose Soja's plans use. [Herxheimer & Petrie, Cochrane Database of Systematic Reviews, 2002]

  • The circadian clock can advance (shift earlier) by a maximum of roughly 1 hour per day under optimal conditions — Soja's plans are rate-limited to this physiological ceiling rather than rushing the schedule. [Eastman & Burgess, Sleep Medicine Clinics, 2009]

  • Dim-light melatonin onset (DLMO) — roughly 2 hours before natural sleep onset — is the most reliable marker of circadian phase, and is the timing anchor Soja's algorithm calculates every intervention against. [Arendt & Skene, Sleep Medicine Reviews, 2005]

  • Melatonin taken at the wrong time (e.g. at bedtime) produces little to no phase shift — it has to be taken several hours before your target DLMO to move the clock, which is why Soja calculates exact timing instead of a flat 'take before bed' rule. [Lewy, Ahmed, Jackson & Sack, Chronobiology International, 1992]

  • Sleep pressure (driven by adenosine build-up) and circadian phase are two separate, independently-timed systems — the two-process model — which is why Soja's recovery plans manage both rather than treating hours of sleep debt as the only variable. [Borbély, Human Neurobiology, 1982]

How the algorithm works

The algorithm runs three stages for every plan:

  1. 1

    DLMO estimation

    Your DLMO is estimated from your normal sleep schedule. Chronotype (early bird, moderate, night owl) applies a calibration offset — night owls have a delayed DLMO relative to their stated bedtime; early birds have an earlier one. The estimate is anchored 120 minutes before your typical sleep onset.

  2. 2

    Phase shift calculation

    The algorithm calculates the total phase shift required to reach your target wake time, then distributes it across recovery days at a physiologically realistic rate: up to 60 minutes of advance per day, up to 90 minutes of delay per day. A deadzone of 15 minutes prevents unnecessary interventions for trivial misalignments. Sleep debt (actual vs. normal sleep time) is factored in to determine whether extra recovery sleep is warranted on day one.

  3. 3

    Practicality filtering

    The raw plan is run through a practicality filter that removes or adjusts interventions that conflict with the user’s preferences (caffeine-free, no melatonin) or that fall outside reasonable hours. Melatonin timing is validated against the estimated DLMO to ensure it produces a phase advance rather than a neutral or counterproductive signal.

Try it

Answer 4 questions about your sleep disruption. Get your personalised day-by-day recovery plan.

Build my plan↗

Free · No account needed · Takes 2 minutes