Stop Guessing If You're Recovering: The Science Behind MOBA's Sleep Analysis
Stop Guessing If You're Recovering: The Science Behind MOBA's Sleep Analysis
I built this because I couldn't sleep for two months. Turns out, neither can most athletes.
Where this started
Two months ago, I moved to Seattle. My sleep fell apart.
Some mornings I was up at 4 AM, wired and exhausted. Other days I wouldn't wake until 11 AM. My Garmin body battery hadn't been above 80 in weeks. My resting heart rate was elevated. I knew I wasn't eating right. Workouts that should've felt manageable felt hard.
I was trying to keep my training consistent, but my body was refusing to cooperate.
Then I started actually looking at my sleep data—not just the "time asleep" number, but the stages, the efficiency, the heart rate through the night. What I found was worse than I expected: I was getting 7.5 hours in bed, but only 55 minutes of deep sleep. My HRV was 20% below my baseline three nights in a row. My body wasn't recovering. It was just existing.
The frustrating part? I had all this data sitting in HealthKit, completely unused. No app was telling me what it meant or what to do about it.
So I built it.
These aren't arbitrary numbers. Every metric MOBA shows you for sleep has a scientific basis, and athletes—more than anyone—need to stop flying blind on recovery.
Why sleep is the most underrated variable in training
Most athletes obsess over training load. Volume, intensity, heart rate zones. Sleep gets treated as a lifestyle variable, not a training variable. That framing is wrong.
A landmark Stanford study by Mah et al. (2011)[^1] had basketball players extend their sleep to 10 hours per night over 5-7 weeks. The results: 9% faster sprint times, 9% improved shooting accuracy, faster reaction times, and significantly lower fatigue ratings. Nothing about their training changed. Sleep did all of it.
This isn't a one-sport finding. A 2014 study by Milewski et al.[^2] followed 112 adolescent athletes over 2 years and found that athletes sleeping fewer than 8 hours per night were 1.7 times more likely to get injured than those sleeping 8+ hours. Injury risk, from nothing but sleep duration.
The mechanism is straightforward. During sleep, particularly deep sleep, your body releases the majority of its daily growth hormone (GH). Van Cauter et al. (2000)[^3] demonstrated that 70% of daily GH secretion occurs during slow-wave sleep. GH drives tissue repair, muscle protein synthesis, and glycogen restoration—the exact biological processes that turn a hard workout into fitness gains. Cut the deep sleep, and you're cutting the recovery signal.
Sleep isn't recovery time. Sleep is the recovery.
What MOBA actually measures
Before explaining the score, here's what we pull from your Apple Watch via HealthKit every night:
- Sleep stages: time in deep (slow-wave), REM, light, and awake — measured in minutes
- Sleep efficiency: ratio of actual sleep time to total time in bed
- Total duration: combined sleep time
- Average sleeping heart rate: mean bpm from bedtime to wake time
- HRV (SDNN): average heart rate variability during the sleep window
- REM cycle timestamps: exact start and end times for each REM period
Each of these maps to a specific physiological recovery process. The sleep score aggregates them into a single number you can act on.
The sleep score: every component, explained
Sleep Score = weighted average of up to 6 components (0–100)
Component 1: Deep sleep (25% weight)
Target: 20% of total sleep
Deep sleep, or slow-wave sleep (SWS), is the most physically restorative stage. It's when GH is released, tissue is rebuilt, and the immune system gets its maintenance window. For athletes, this is the stage that actually converts training stress into adaptation.
We score deep sleep as a ratio against a 20% target—consistent with the physiological literature. Adults typically achieve 15-20% deep sleep under healthy conditions (Walker, 2017)[^4]. Athletes in heavy training often see deep sleep increase, which is the body's adaptive response to higher recovery demand (Leeder et al., 2012)[^5].
Score: min(deepSleep / totalDuration / 0.20, 1.0)
If you hit 20% or more, you score 1.0 on this component. Below that, proportionally less.
Component 2: REM sleep (20% weight)
Target: 22% of total sleep
REM sleep is where the brain does its work. Specifically, REM is critical for motor learning and skill consolidation. Walker et al. (2002)[^6] showed that post-practice REM sleep is causally linked to the overnight improvement in procedural motor skills. The technique you worked on at practice today gets locked in during REM tonight.
Beyond skill learning, REM is tied to emotional regulation and cognitive function—both of which take a measurable hit when athletes are overtrained and under-slept (Samuels, 2008)[^7].
We target 22%, the approximate upper bound of typical healthy adult REM percentages (Carskadon & Dement, 2011)[^8].
Score: min(remSleep / totalDuration / 0.22, 1.0)
Component 3: Sleep duration (20% weight)
Target: 8 hours (480 minutes)
The research on duration is blunt: most athletes need more than the general population recommendation of 7 hours.
Watson (2017)[^9] reviewed the evidence and recommended 7–9 hours for adult athletes, with elites often benefiting from 9–10 hours. The Mah et al. Stanford study[^1] had athletes sleep until 10 hours—and performance improved. The mechanism is dose-dependent: more sleep means more full sleep cycles, more deep sleep, more REM.
We use 480 minutes (8 hours) as the target, which is conservative relative to elite athlete recommendations. If you're consistently hitting the ceiling on this component, consider going to 9.
Score: min(totalDuration / 480, 1.0)
Component 4: Sleep efficiency (15% weight)
Target: 85%
Sleep efficiency is the percentage of time in bed that you're actually asleep:
Sleep Efficiency = (Total Sleep Time / Time in Bed) × 100
The Pittsburgh Sleep Quality Index (Buysse et al., 1989)[^10]—the most widely used clinical tool for evaluating sleep quality—uses 85% as the threshold between good and poor sleep efficiency. Below 85% is a clinical indicator of sleep disruption, often associated with insomnia, anxiety, or environmental factors.
For athletes, poor efficiency often signals stress overload, overtraining, or a sleep environment issue. It's one of the first markers that something systemic is wrong.
Score: min(sleepEfficiency / 0.85, 1.0)
Component 5: Resting heart rate during sleep (10% weight, when available)
Target: 10%+ below your personal nightly baseline
Your heart rate during sleep is a real-time window into your autonomic nervous system's recovery state. When you're fully recovered, your heart works less hard during sleep—cardiac output drops, parasympathetic tone increases, and your sleeping HR falls meaningfully below your typical resting waking HR.
Buchheit et al. (2004)[^11] demonstrated that overnight heart rate indices predict next-day HRV and subjective recovery state in athletes. A sleeping HR elevated above your personal norm is a reliable early warning sign of accumulated fatigue, illness onset, or excessive training load.
We score HR relative to your own baseline, not against a population average—because a 48 bpm sleeping HR means something different for a seasoned ultrarunner than for a recreational jogger.
HR Score: 90% of your baseline → 1.0 | At baseline → 0.5 | 110% above baseline → 0.0
If your Apple Watch isn't recording continuous HR during sleep (some older models), this component is excluded and the remaining weights renormalize automatically.
Component 6: Heart rate variability (10% weight, when available)
Target: at or above your personal 7-night HRV baseline
HRV is the variation in time between consecutive heartbeats, measured in milliseconds (SDNN). Higher HRV means more parasympathetic dominance, which means better recovery state. It's the closest thing we have to a direct physiological readout of how recovered your nervous system actually is.
Plews et al. (2012)[^12] established that HRV is more sensitive to training load and recovery status than heart rate alone, particularly when tracked longitudinally relative to personal baselines rather than absolute values. Buchheit (2014)[^13] expanded this work, showing that HRV-guided training produces superior performance outcomes compared to fixed training plans, because it responds in real-time to actual recovery state.
Overnight HRV is specifically valuable because it's measured during your most stable, undisturbed physiological state—free from the noise of movement, eating, and stress that contaminates daytime readings.
HRV Score: 70% of your baseline → 0.0 | At baseline → 0.6 | 120% above → 1.0
Why is "at baseline" only 0.6 instead of 1.0? Because HRV being exactly at your baseline means recovery is average, not optimal. We reward you for surpassing your own norm. Nights where you're 20%+ above your typical HRV are rare, hard-earned, and genuinely excellent recovery.
Why dynamic weighting matters
The six components are combined with automatic weight renormalization:
Score = Σ(component × weight) / Σ(weights included)
If your device doesn't record HRV, the 10% weight redistributes across the other components. No component inflates because data is missing, and no user is penalized for hardware limitations.
| Data available | Effective weights |
|---|---|
| All 6 components | Deep 25% / REM 20% / Duration 20% / Efficiency 15% / HR 10% / HRV 10% |
| No HRV | Deep 27.8% / REM 22.2% / Duration 22.2% / Efficiency 16.7% / HR 11.1% |
| No HR or HRV | Deep 31% / REM 25% / Duration 25% / Efficiency 19% |
The bedtime window: why sleep cycles actually matter
Most sleep apps tell you to "go to bed at 10 PM." That's well-intentioned and mostly useless.
What matters isn't just when you go to bed—it's how many complete sleep cycles you get.
Sleep proceeds in cycles of approximately 90 minutes, each containing a progression through light sleep, deep sleep, and REM. The critical insight from Carskadon & Dement (2011)[^8] is that waking at the end of a cycle (during the light sleep transition) feels dramatically different from waking mid-cycle in deep sleep. The same 7.5 hours of sleep can leave you feeling refreshed or groggy depending entirely on where in the cycle your alarm hits.
MOBA approaches this two ways.
For users with fewer than 7 nights of data, we use the standard 90-minute cycle as the basis for bedtime window calculation, presenting 3 options (4, 5, or 6 cycles) that align wake time with natural cycle transitions.
For users with 3+ nights of measured cycle data, we compute your personal average cycle length from actual REM timestamps. We find the start of each distinct REM period from your HealthKit data, measure the gap between consecutive REM onset times (the true cycle-to-cycle interval), and compute your average across all recorded nights.
This matters because real cycle lengths range from 70 to 110 minutes between individuals (Aeschbach et al., 1993)[^14]. A person with 75-minute cycles who uses a 90-minute calculator is building their bedtime window around the wrong math—and systematically waking up mid-cycle.
The bedtime window we show you is derived from your wake time target (set in settings), working backwards in cycle-length increments:
Ideal Bedtime = Target Wake Time − (N × personal_cycle_minutes)
Four cycles is minimum viable sleep for most adults. Five cycles is the recommended target. Six is ideal during high training load.
The eating window: the sleep disruptor nobody talks about
You dialed in your training nutrition. Pre-workout carbs, post-workout protein, hydration. But what about the meal you eat at 9 PM?
Late evening eating disrupts sleep through two mechanisms.
First, digestion elevates core temperature, and falling core body temperature is a prerequisite for sleep initiation. St-Onge et al. (2016)[^15] demonstrated that high-fat evening meals significantly delay sleep onset and reduce slow-wave sleep duration. The disruption isn't trivial—it can cost 20+ minutes of deep sleep per night.
Second, chrono-nutrition research has established that eating late sends conflicting signals to peripheral circadian clocks in metabolic tissues (Pot et al., 2016)[^16]. For athletes, this creates a downstream effect on substrate oxidation and muscle protein synthesis timing—both of which have rhythmic components that late eating disrupts.
How MOBA calculates your eating cutoff: we need at least 7 nights of co-occurring meal and sleep data to make a recommendation. For each night where you logged meals, we find your last meal timestamp and pair it with that night's sleep score. We then split your recorded nights at the median score: "good nights" vs. "average nights."
The recommended eating cutoff is the median last-meal time on your good nights. Not a population guideline. Your actual data, showing what meal timing correlates with your best sleep.
If you consistently sleep better on nights when your last meal was at 7:30 PM versus 9:30 PM, MOBA will tell you that—with your own nights as the evidence.
Common questions
Q: My score dropped after a hard training block. Is that bad?
A: Not necessarily. Heavy training temporarily suppresses deep sleep and HRV as the body mounts an acute stress response. A short score dip after a big week is normal. A score that stays low for 7+ days without recovery is a signal to back off.
Q: Why is my HRV baseline only based on 7 nights?
A: We use a rolling window to stay current. A baseline from 3 months ago doesn't reflect your present fitness state. For long-term trend tracking, we're building historical comparisons—but for daily scoring, recent baseline is more actionable.
Q: My Apple Watch doesn't record HRV. Am I getting accurate scores?
A: Yes. HRV is automatically excluded from your score, and the remaining weights renormalize. You'll still get a meaningful score from the 4 core components. Apple Watch Series 4+ records HRV nightly; older hardware may not.
Q: I sleep 6 hours but feel fine. Why is my score low?
A: Subjective sleep perception and objective sleep quality diverge significantly under chronic mild sleep restriction (Van Dongen et al., 2003)[^17]. The research is consistent: people who chronically sleep 6 hours stop noticing their performance degradation because they have no contrast. The body adapts psychologically while still accumulating physiological sleep debt.
Q: I hit 90+ on my sleep score. What do I do differently?
A: Nothing. Protect whatever conditions produced it—meal timing, bedtime, environment, stress load. The score is diagnostic, not aspirational. A 90 tells you to be consistent, not to push further.
The bottom line
Training is a stimulus. Sleep is the adaptation.
Every workout you do creates a recovery debt that only sleep can pay. The adaptations you're training for—stronger muscles, better aerobic capacity, sharper technique—are built during sleep, not during the workout.
For two months, I was training hard and wondering why I wasn't improving. The answer was in my watch the whole time. I was getting quantity without quality: hours in bed, but not the right kind of sleep, at the right time, with the right recovery signals.
MOBA's sleep analysis exists because athletes deserve to know whether their recovery is actually working—with the same rigor they apply to training load. A personal score built from your data, grounded in the research, that tells you exactly what's happening and why.
Academic references
[^1]: Mah, C. D., Mah, K. E., Kezirian, E. J., & Dement, W. C. (2011). The effects of sleep extension on the athletic performance of collegiate basketball players. Sleep, 34(7), 943-950.
[^2]: Milewski, M. D., Skaggs, D. L., Bishop, G. A., Pace, J. L., Ibrahim, D. A., Wren, T. A., & Byczkowski, T. (2014). Chronic lack of sleep is associated with increased sports injuries in adolescent athletes. Journal of Pediatric Orthopaedics, 34(2), 129-133.
[^3]: Van Cauter, E., Leproult, R., & Plat, L. (2000). Age-related changes in slow wave sleep and REM sleep and relationship with growth hormone and cortisol levels in healthy men. JAMA, 284(7), 861-868.
[^4]: Walker, M. (2017). Why We Sleep: Unlocking the Power of Sleep and Dreams. Scribner.
[^5]: Leeder, J., Glaister, M., Pizzoferro, K., Dawson, J., & Pedlar, C. (2012). Sleep duration and quality in elite athletes measured using wristwatch actigraphy. Journal of Sports Sciences, 30(6), 541-545.
[^6]: Walker, M. P., Brakefield, T., Morgan, A., Hobson, J. A., & Stickgold, R. (2002). Practice with sleep makes perfect: sleep-dependent motor skill learning. Neuron, 35(1), 205-211.
[^7]: Samuels, C. (2008). Sleep, recovery, and performance: the new frontier in high-performance athletics. Physical Medicine and Rehabilitation Clinics of North America, 20(1), 149-159.
[^8]: Carskadon, M. A., & Dement, W. C. (2011). Monitoring and staging human sleep. In M. H. Kryger, T. Roth, & W. C. Dement (Eds.), Principles and Practice of Sleep Medicine (5th ed., pp. 16-26). Elsevier Saunders.
[^9]: Watson, A. M. (2017). Sleep and athletic performance. Current Sports Medicine Reports, 16(6), 413-418.
[^10]: Buysse, D. J., Reynolds, C. F., Monk, T. H., Berman, S. R., & Kupfer, D. J. (1989). The Pittsburgh Sleep Quality Index: a new instrument for psychiatric practice and research. Psychiatry Research, 28(2), 193-213.
[^11]: Buchheit, M., Papelier, Y., Laursen, P. B., & Ahmaidi, S. (2007). Noninvasive assessment of cardiac parasympathetic function: postexercise heart rate recovery or heart rate variability? American Journal of Physiology-Heart and Circulatory Physiology, 293(1), H8-H10.
[^12]: Plews, D. J., Laursen, P. B., Stanley, J., Kilding, A. E., & Buchheit, M. (2012). Training adaptation and heart rate variability in elite endurance athletes: opening the door to effective monitoring. Sports Medicine, 43(9), 773-781.
[^13]: Buchheit, M. (2014). Monitoring training status with HR measures: do all roads lead to Rome? Frontiers in Physiology, 5, 73.
[^14]: Aeschbach, D., Dijk, D. J., Trachsel, L., Brunner, D. P., & Borbély, A. A. (1993). Dynamics of slow-wave activity and spindle frequency activity in the human sleep EEG: effect of prolonged wakefulness and recovery sleep. Sleep, 16(8), 718-723.
[^15]: St-Onge, M. P., Mikic, A., & Pietrolungo, C. E. (2016). Effects of diet on sleep quality. Advances in Nutrition, 7(5), 938-949.
[^16]: Pot, G. K., Hardy, R., & Stephen, A. M. (2016). Irregularity of energy intake at meals: prospective associations with the metabolic syndrome in adults of the 1946 British birth cohort. British Journal of Nutrition, 115(2), 315-323.
[^17]: Van Dongen, H. P., Maislin, G., Mullington, J. M., & Dinges, D. F. (2003). The cumulative cost of additional wakefulness: dose-response effects on neurobehavioral functions and sleep physiology from chronic sleep restriction and total sleep deprivation. Sleep, 26(2), 117-126.
Last updated: March 7, 2026