Skip to main navigation Skip to search Skip to main content

Towards proactively improving sleep: machine learning and wearable device data forecast sleep efficiency 4-8 hours before sleep onset

Research output: Journal Publications and ReviewsRGC 21 - Publication in refereed journalpeer-review

Abstract

Wearable devices with sleep-tracking functionalities can prompt behavioral changes to promote sleep, but proactively preventing poor sleep when it is likely to occur remains a challenge due to a lack of prediction models that can forecast sleep parameters prior to sleep onset. We developed models that forecast low sleep efficiency 4 and 8 hours prior to sleep onset using gradient boosting (CatBoost) and deep learning (Convolutional Neural Network Long Short-Term Memory, CNN-LSTM) algorithms trained exclusively on accelerometer data from 80,811 adults in the UK Biobank. Associations of various sleep and activity parameters with sleep efficiency were further examined. During repeated cross-validation, both CatBoost and CNN-LSTM exhibited excellent predictive performance (median AUCs > 0.90, median AUPRCs > 0.79). U-shaped relationships were observed between total activity within 4 and 8 hours of sleep onset and low sleep efficiency. Functional data analyses revealed higher activity 6–8 hours prior to sleep onset had negligible associations with sleep efficiency. Higher activity 4–6 hours prior had moderate beneficial associations, while higher activity within 4 hours had detrimental associations. Additional analyses showed that increased variability in sleep duration, efficiency, onset timing, and offset timing over the preceding 4 days was associated with lower sleep efficiency. Our study represents a first step towards wearable-based machine learning systems that proactively prevent poor sleep by demonstrating that sleep efficiency can be accurately forecasted prior to bedtime and by identifying pre-bed activity targets for subsequent intervention.

© The Author(s) 2025
Original languageEnglish
Number of pages16
JournalSleep
Volume48
Issue number8
Online published28 Apr 2025
DOIs
Publication statusPublished - Aug 2025

Bibliographical note

© The Author(s) 2025. Published by Oxford University Press on behalf of Sleep Research Society. All rights reserved. For commercial re-use, please contact [email protected] for reprints and translation rights for reprints. All other permissions can be obtained through our RightsLink service via the Permissions link on the article page on our site—for further information please contact [email protected].

Research Keywords

  • accelerometer
  • sleep efficiency
  • machine learning
  • deep learning
  • functional data analysis
  • forecasting
  • wearables
  • sleep interventions
  • sleep quality

Fingerprint

Dive into the research topics of 'Towards proactively improving sleep: machine learning and wearable device data forecast sleep efficiency 4-8 hours before sleep onset'. Together they form a unique fingerprint.

Cite this