⏱️ Lectura: 10 min

Sleeping eight hours a night doesn’t protect you as much as going to bed and waking up at the same time every day. A prospective study published in the journal Sleep, using accelerometer data from the UK Biobank, found that sleep regularity is a better predictor of mortality risk than the total number of hours slept.

📑 En este artículo
  1. TL;DR
  2. Introduction
  3. What happened
  4. Context and history
  5. Technical details and performance
  6. How to start measuring your own sleep regularity
  7. Impact and analysis
  8. What’s next
  9. Frequently Asked Questions
    1. What is the Sleep Regularity Index (SRI)?
    2. Does regularity matter more than sleeping 8 hours?
    3. What data did the study use?
    4. Does this mean that sleeping on irregular schedules causes death?
    5. Can I calculate my own SRI with an Apple Watch or Fitbit?
    6. Where was the original study published?
  10. References

The finding matters for anyone working with health or wearable data: the team led by Windred and colleagues did not measure opinions or surveys, but accelerometer time series processed with a reproducible metric, the Sleep Regularity Index (SRI).

TL;DR

  • The study in the journal Sleep (Windred et al., 2024) used accelerometers from the UK Biobank to measure sleep regularity.
  • The Sleep Regularity Index (SRI) measures, on a scale from -100 to 100, how similar your sleep schedule is from one day to the next.
  • Central finding: sleep regularity predicted mortality better than the number of hours slept.
  • It is a prospective cohort study, not a controlled trial: it shows association, not proven causation.
  • The SRI can be calculated from wearable data such as Fitbit, Apple Watch, or Oura using Python.
  • Sleep irregularity was also associated with higher cardiometabolic and cancer mortality.
  • The full paper is available on academic.oup.com, journal Sleep, volume 47, issue 1, January 2024.

Introduction

Sleep science had spent decades obsessed with a single number: how many hours you sleep per night. The study Sleep regularity is a stronger predictor of mortality risk than sleep duration, published in January 2024 in the journal Sleep, turns that obsession on its head: what matters is not how much you sleep, but whether you always sleep on the same schedule.

The team, led by Daniel P. Windred of the Turner Institute for Brain and Mental Health at Monash University, along with researchers from Brigham and Women’s Hospital, the Broad Institute, and the University of Manchester, worked with objective accelerometer data from the UK Biobank rather than self-reported surveys. That methodological detail is key for any developer used to distrusting data that relies on a user’s memory.

What happened

The authors took the wrist accelerometer records of UK Biobank participants, a population biobank in the United Kingdom that follows hundreds of thousands of people over the years. From the movement captured minute by minute, they classified each interval as sleep or wakefulness and built, for each person, a sleep and wake pattern across several consecutive days.

With that pattern they calculated two variables separately: total sleep duration (the average hours slept per night) and sleep regularity, measured with the Sleep Regularity Index (SRI). They then cross-referenced both variables against mortality records during the follow-up period. The result that gives the paper its title: regularity predicted all-cause mortality with greater statistical strength than duration, even after adjusting for duration, age, sex, and other confounding factors.

Context and history

This team did not invent the SRI. The metric comes from an earlier paper by Phillips and colleagues, published in 2017 in Scientific Reports, where it was proposed as a way to quantify how similar your sleep schedule is from one day to the next. Before the SRI, sleep variability was measured with cruder proxies, such as the standard deviation of bedtime, which ignore the minute-by-minute structure of the pattern.

Sleep irregularity had already been linked to poorer academic performance and delayed circadian rhythm. What the 2024 study adds is scale: it cross-references the SRI, calculated on objective accelerometer data, against an outcome as hard as mortality, in a cohort large enough to have real statistical power.

Wearable measuring the sleep pattern to calculate sleep regularity
The wrist accelerometers measured movement around the clock for several days in a row. Foto de Tânia Mousinho en Unsplash

Technical details and performance

The SRI formula compares, minute by minute, whether the sleep or wake state at instant t equals the state at instant t + 24 hours. The percentage of matches is calculated across the entire record and rescaled so the result falls between -100 and 100: one hundred means an identical schedule day after day, zero equals a random pattern.

You can reproduce the core logic of the SRI with a couple of NumPy arrays. This first block calculates the index between two consecutive days for a single user, using per-minute sleep and wake labels (1 = asleep, 0 = awake):

import numpy as np

def sri_par_de_dias(dia_1, dia_2):
    """dia_1 y dia_2: arrays de 1440 valores (uno por minuto), 1=dormido, 0=despierto"""
    coincidencias = np.array(dia_1) == np.array(dia_2)
    porcentaje_igual = coincidencias.mean()
    return (200 * porcentaje_igual) - 100

sueno_lunes = np.array([1]*420 + [0]*1020)   # durmió 7 horas seguidas
sueno_martes = np.array([1]*400 + [0]*1040)  # durmió 6h40, horario similar

print(sri_par_de_dias(sueno_lunes, sueno_martes))

That script returns a number close to 100 when the schedule of both days matches almost minute by minute, and drops toward 0 when the overlap is random. A more realistic example, using a multi-day series from a Fitbit or Apple Health type dataset, calculates the SRI as the average of all consecutive comparisons:

import pandas as pd
import numpy as np

def sri_serie_completa(matriz_sueno):
    """matriz_sueno: DataFrame con una fila por día y 1440 columnas (minutos), 1=dormido, 0=despierto"""
    dias = matriz_sueno.values
    coincidencias_totales = []
    for i in range(len(dias) - 1):
        coincidencias = (dias[i] == dias[i + 1]).mean()
        coincidencias_totales.append(coincidencias)
    sri = (200 * np.mean(coincidencias_totales)) - 100
    return round(sri, 1)

registros = pd.read_csv("sueno_wearable.csv")  # una fila por día, columnas minuto_0..minuto_1439
print(f"SRI de los últimos {len(registros)} días: {sri_serie_completa(registros)}")
Metric What it measures How it is calculated What it predicted in the study
Sleep duration Total number of hours slept per night Average sleep hours detected by the accelerometer Association with mortality, but weaker than regularity
Sleep Regularity Index (SRI) How similar the sleep schedule is from one day to another Minute-by-minute match between today’s pattern and the one 24 hours earlier, rescaled from -100 to 100 Stronger predictor of all-cause mortality than duration
Chart comparing regular and irregular sleep schedules
Two weeks of sleep: regular pattern on top, irregular on the bottom, same total number of hours. Foto de Slaapwijsheid.nl en Unsplash
flowchart TD
A["Acelerómetro de muñeca"] --> B["Serie de movimiento por minuto"]
B --> C["Clasificador sueño/vigilia"]
C --> D["Matriz de días x 1440 minutos"]
D --> E["Cálculo del SRI"]
D --> F["Cálculo de duración promedio"]
E --> G[("Modelo de riesgo de mortalidad")]
F --> G

How to start measuring your own sleep regularity

You don’t need access to the UK Biobank to calculate your own SRI. If you export your Apple Watch, Fitbit, or Oura Ring data to a CSV with per-minute sleep and wake marks, you can run the same calculation on your machine. First install Python and the required libraries:

# Windows (PowerShell)
winget install Python.Python.3.12
pip install pandas numpy

# macOS
brew install python
pip3 install pandas numpy

# Linux (Debian/Ubuntu)
sudo apt install python3 python3-pip
pip3 install pandas numpy

With the dependencies installed, the flow is: export your sleep history to a CSV with one row per day and one column per minute (0 or 1), load it with pandas.read_csv, and pass it through the sri_serie_completa function from the previous block. The more consecutive days you include, the more stable the average becomes: the authors themselves used multiple days of continuous recording per participant, not a single night.

💡 Tip: if your wearable doesn’t export minute-by-minute data, you can approximate the SRI using the start and end time of each sleep session and comparing the time overlap between consecutive nights. It loses precision, but works as a first signal.

To confirm your implementation is put together correctly, run the function on two identical days (the same array repeated): the result should be exactly 100. If you pass a random array against another random array of the same length, the average should be around 0. That boundary test is the simplest way to verify there are no indexing errors:

dia_random_a = np.random.randint(0, 2, 1440)
dia_random_b = np.random.randint(0, 2, 1440)
print(sri_par_de_dias(dia_random_a, dia_random_a))  # debe dar 100.0
print(sri_par_de_dias(dia_random_a, dia_random_b))  # debe rondar 0

Impact and analysis

The finding has practical consequences for anyone building digital health products or wearables. Today most sleep apps highlight a single number on the main screen: hours slept. If regularity predicts mortality more strongly, a dashboard that only shows duration is hiding the most important signal.

For data teams working with health cohorts, the study is also a methodological reminder: using objective sensors instead of self-reporting reduces measurement noise and makes it possible to detect associations that sleep surveys don’t capture with the same temporal resolution.

⚠️ Watch out: the study is a prospective cohort analysis, not a randomized controlled trial. It shows a statistical association between irregularity and mortality, adjusted for several confounding factors, but does not prove direct causation. Sleeping on irregular schedules could be a marker of other health problems or of shift work, not necessarily the direct cause of death.

Another real limitation: the UK Biobank has a known participation bias toward healthier people of higher socioeconomic status than the general population, which can affect how well these results generalize to other populations, including Latin America, where shift-work and commuting patterns are different.

What’s next

The authors themselves note that the logical next step is to test whether interventions that improve sleep regularity (more stable work schedules, light therapy, fixed-schedule reminders) reduce mortality risk in controlled trials, not just in observational studies. That kind of trial does not yet exist at the scale of the UK Biobank.

For the health app ecosystem, it’s reasonable to expect that more platforms will start surfacing some version of the SRI or a regularity metric alongside total duration, following the same path they already took with heart rate variability (HRV).

📖 Summary on Telegram: Ver resumen

Try it yourself: run sri_serie_completa on the sleep CSV that your own wearable exports and compare your number against the paper’s -100 to 100 scale.

Frequently Asked Questions

What is the Sleep Regularity Index (SRI)?

It is a metric from -100 to 100 that compares, minute by minute, how similar your sleep and wake pattern is on one day versus the previous day. One hundred equals an identical schedule every day; zero, a completely random pattern.

Does regularity matter more than sleeping 8 hours?

According to this study, yes: sleep regularity predicted all-cause mortality with more statistical strength than the total number of hours slept, even after adjusting for duration itself.

What data did the study use?

Wrist accelerometer records from UK Biobank participants, cross-referenced against official mortality records during the follow-up period.

Does this mean that sleeping on irregular schedules causes death?

Not directly. It is an observational study: it shows a statistical association adjusted for confounding factors, not a causal relationship proven by a controlled trial.

Can I calculate my own SRI with an Apple Watch or Fitbit?

Yes, if you export your sleep data at minute resolution you can apply the same formula described in this article with Python and pandas.

Where was the original study published?

In the journal Sleep, from Oxford Academic, volume 47, issue 1, in January 2024, under the title “Sleep regularity is a stronger predictor of mortality risk than sleep duration”.

References

  • Windred et al., 2024, journal Sleep: the original study with the full methodology and statistical adjustment models.
  • Scientific Reports: journal where Phillips and colleagues published the original definition of the Sleep Regularity Index in 2017.
  • UK Biobank: official description of the population biobank and its accelerometry sub-study.
  • Actigraphy, Wikipedia: general context on how wrist accelerometers work to measure sleep.

📱 Do you like this content? Follow @programacion on Telegram for daily tech content in Spanish: quick summaries, fresh content every day. @programacion

Imagen destacada: Foto de Curology en Unsplash

Categories: Noticias Tech

Andrés Morales

Developer and AI researcher. Writes about language models, frameworks, developer tooling, and open source releases. Covers ML papers, the tech startup ecosystem, and programming trends.

0 Comments

Leave a Reply

Avatar placeholder

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.