Abstract
Introduction: Wearable devices are rapidly improving our ability to observe health-related processes for extended durations in an unintrusive manner. In this study, we use wearable devices to understand how the shape of the heart rate curve during sleep relates to mental health. Methods: As part of the Lived Experiences Measured Using Rings Study (LEMURS), we collected heart rate measurements using the Oura ring (Gen3) for over 25,000 sleep periods and self-reported mental health indicators from roughly 600 first-year university students in the USA during the fall semester of 2022. Using clustering techniques, we find that the sleeping heart rate curves can be broadly separated into two categories that are mainly differentiated by how far along the sleep period the lowest heart rate is reached. Results: Sleep periods characterized by reaching the lowest heart rate later during sleep are also associated with shorter deep and REM sleep and longer light sleep, but not a difference in total sleep duration. Aggregating sleep periods at the individual level, we find that consistently reaching the lowest heart rate later during sleep is a significant predictor of (1) self-reported impairment due to anxiety or depression, (2) a prior mental health diagnosis, and (3) firsthand experience in traumatic events. This association is more pronounced among females. Conclusion: Our results show that the shape of the sleeping heart rate curve, which is only weakly correlated with descriptive statistics such as the average or the minimum heart rate, is a viable but mostly overlooked metric that can help quantify the relationship between sleep and mental health.
Introduction
Sleep is an important component of well-being, with poor sleep leading to impaired function at the individual and societal [1‒5] levels. While some aspects of sleep can be easily monitored, such as the awakening time or the time to bed, the unconscious nature of sleep requires external monitoring for proper assessment [6]. Polysomnography has been the gold standard for sleep monitoring, but it requires controlled conditions in a clinical setting, making it costly and inconvenient [7, 8]. In comparison, the growing availability of consumer-grade wearable devices allows individuals to monitor their sleep for extended periods in a nondisruptive and more affordable manner without the recall bias characteristic of self-reports [9]. Feedback from wearable devices is also available soon after data collection, which aids in delivering and assessing the effects of behavioral changes such as interventions.
Sleep has mostly been assessed in terms of sleep duration, sleep efficiency, and the time spent in different sleep stages [10, 11]. Heart rate variability (HRV) is also of interest, particularly in studies on sleep apnea [12‒14], and time- and frequency-domain analysis techniques are commonly used [15, 16]. Clustering techniques have been applied on these metrics to find sleep phenotypes, sleep patterns shared by a group of individuals that may also share similar characteristics [17‒20]. While most use descriptive statistics of these metrics in the clustering algorithm, more recent work used features extracted from the raw sleep-wake time series from more than 100,000 individuals to infer sleep phenotypes related to insomnia [21].
While it has long been known that heart rate generally decreases during sleep [22], the patterns of change in the sleeping heart rate are not well-studied. Unlike other sleep metrics such as sleep stages or HRV, heart rate is more reliably measured by consumer wearable devices [23‒27] using photoplethysmography [28], especially when the participant is at rest [29]. Heart rate patterns during sleep may give us valuable insights that may be more consistent across brands of wearable devices compared to those obtained using other sleep metrics.
Mental health has been shown to have a bidirectional relationship with sleep [5, 30, 31], indicating that treating sleep disorders may also improve mental health [32]. Most studies on mental health and sleep focus on perceived sleep quality [33], sleep duration [34‒37], HRV [16, 38], or descriptive statistics (mean or minimum) of the heart rate [39‒42]. Published studies on the relationship between the shape of the heart rate curve and mental health have focused on its periodicity in the context of daily circadian rhythms [43‒46] or its shape for daytime and nighttime [47] but not on how heart rate changes during the sleep period itself.
Young adulthood is a critical life stage in detecting and treating mental health conditions and has been the subject of several studies [48‒51]. An ongoing study at a university in the northeast USA (the Lived Experiences Measured Using Rings Study, or LEMURS) [52‒54] monitors the mental and physical well-being of a cohort of college students using surveys and the Oura ring (Gen3), a wearable sleep and activity tracker [23, 24] that provides heart rate measurements in excellent agreement with those from electrocardiography [27]. With around half of study participants diagnosed with a mental health condition or having experienced two or more traumatic events [55], this dataset provides a unique perspective on the relationship between mental health and sleep for a population at risk.
Using data from the LEMURS study, we look at different patterns of change in the heart rate over a sleep period and relate these to the reported mental health indicators of the participants. Similar to the systematic characterization of sleep phenotypes from sleep-wake measurements using wearable devices [21], we perform clustering algorithms on the heart rate time series to see if these heart rate patterns can be grouped into categories. Associations between these categories and clinically relevant information, such as mental health outcomes, are then examined.
Methods
Data
Sleep data were obtained from 603 participants in LEMURS, who, at the time of the study, were first-year students in a university in the USA [52‒54]. Participants were asked to wear the Oura ring (Gen3) during sleep for 8 weeks (Oct–Dec 2022). We examine heart rate time series measured by the ring at 5-min intervals from the start of each detected primary sleep period, yielding 25,800 time series for analysis. The ring also collects sleep period start and end times, the estimated duration of each sleep stage (light, REM, and deep sleep), time spent awake during the sleep period, average and lowest heart rates, the time when the lowest heart rate is obtained, sleep latency, average respiratory rate, average respiratory rate variation, and HRV.
To denoise the heart rate time series and make them comparable for sleep periods of different durations, we use piecewise aggregate approximation (PAA) [56, 57], dividing a time series into n = 30 equally sized segments and taking the mean of each. With a median of 102 data points per sleep period, n = 30 roughly corresponds to 15 min of sleep per segment. Using n = 30 allows us to include even the shortest sleep period (39 data points, or roughly 3.25 h of sleep). As movement during sleep results in poorer heart rate estimates [29], the Oura ring does not provide HR measurements when there is significant movement. This creates missing values in the raw time series. Sleep periods where there is at least one segment with a missing PAA value are disregarded, reducing the number of sleep periods examined to m = 20,167 belonging to N = 599 individuals. The disregarded sleep periods span a similar range of sleep period lengths (online suppl. Fig. S6; for all online suppl. material, see https://doi.org/10.1159/000539487) and are from 587 individuals, indicating that disregarding time series with missing PAA values does not sufficiently discriminate against a few users or sleep period durations.
Participants completed baseline surveys (Table S1) about their demographics (e.g., gender, race), mental health diagnoses [58], impairment due to anxiety or depression, and the number of types of traumatic events experienced firsthand [55] (0, 1, or ≥2). They also completed the Perceived Stress Scale (PSS) [59] and Generalized Anxiety Disorder-7 (GAD-7) [60] questionnaires at the end of each week throughout the study period. The PSS is designed to assess stress while the GAD-7 is a tool used to screen for generalized anxiety disorder.
The students all entered the university in the same academic year, studied full-time, and were required to be within 18–24 years of age to be part of the study. 96% of the students reported birth years between 2002 and 2004.
Clustering the Time Series
We perform k-means clustering [61] on the m = 20,167 heart rate time series processed with PAA. The optimum number of clusters, k, is determined using consistency metrics. First, we use 30 randomly selected subsets of the data (10% of the total size) to train the model. For each training subset, we perform k-means with 30 different centroid initializations and assign the remaining observations to a given cluster based on the trained model. This results in 900 different k-means runs for each value of k. If the clustering is robust, the time series must be clustered similarly for different runs, resulting in the convergence of the cluster centroids across the different randomizations. Once consistent cluster centroids are found, we standardize the cluster centroids by training the k-means model on the entire dataset for 30 different initializations. We perform another round of k-means on these centroids, resulting in what we call “metaclusters.” Cluster centroids assigned to the same metacluster will be assigned the same cluster label, and this cluster label will be transmitted back to the raw heart rate time series. Each raw heart rate time series will have 30 cluster labels, and the mode of these will be the final cluster label assignment for the time series. While we discuss here the results using Euclidean distance in the clustering algorithm, constrained dynamic time warping (cDTW) produced similar results (online suppl. Fig. S5).
Understanding the Clusters
We use logistic regression to gain insight into the sleep measures that differentiate the clusters. Because the clusters were obtained solely from the shapes of the heart rate curves, we do not add random effects. After performing regression models using each measure separately, we combine the sleep measures in a single model and use stepAIC of the MASS library in R to perform stepwise regression. We check for practical significance by examining the distributions and descriptive statistics of each sleep measure for the clusters found.
Relating Clusters to Mental Health
For each sleep period, we take the cluster label as the outcome variable and the survey responses of the individual as the predictors. Specifically, we look at the individual’s baseline survey responses on prior mental health diagnoses, impairment due to anxiety or depression, traumatic events experienced, gender and race, and their weekly PSS and GAD-7 scores. Since the PSS and GAD-7 scores are obtained weekly while the sleep data are obtained nightly, we only include weeks where a given participant answered the weekly survey and had at least three (3) recorded sleep periods. We also require that this restriction yields at least ten (10) sleep periods for a given participant. These ensure that the weight of a given sleep period to the weekly PSS score is not artificially high and that enough data points are available for the fraction of sleep periods in a given cluster for each individual to be a reasonable measure. We note that these steps yield similar distributions of the demographic variables (online suppl. Fig. S7). This results in a dataset with 15,073 sleep periods from N = 505 participants. Logistic mixed-effects models, with the participant ID and the week number treated as random effects, were used in the analysis.
We then focus on predicting an individual’s mental health indicators (impairment, prior mental health diagnosis, and firsthand experience of traumatic events) from their sleeping heart patterns using logistic regression. All regression models were implemented using the Python package pymer4 [62].
Results
Highly consistent cluster labels were obtained across different centroid initializations or training subsets for k = 2 clusters but not for higher values of k (Fig. 1). Using the full dataset to train the clustering model, 99.96% of the sleep periods had identical cluster assignments after performing k-means 30 times, each with different centroid initializations. Much lower values are obtained for higher values of k (online suppl. Fig. S2, S3). This separation into two groups was further confirmed with pairwise correlation maps (online suppl. Fig. S4) and high Jaccard similarity coefficients of obtained clusters under resampling, a method used to check cluster stability [63].
Cluster Characteristics
Logistic regression reveals that the two clusters are most differentiated by how far along the sleep period the lowest HR is measured. It is the most relevant predictor in the regression model, resulting in the lowest AIC and residual deviance when used as a lone predictor, and is the most highly correlated with the cluster label. We can see this clearly in the distributions of this variable for the two clusters, as well as from the shape of the cluster centroids (Fig. 2a). The time required to reach the lowest heart rate is only weakly correlated with the average heart rate (Spearman’s ρ = 0.1 for both raw time and fraction of the sleep period) and the lowest heart rate (Spearman’s ρ = 0.03 for raw time and ρ = 0.05 for fraction of the sleep period). We denote the cluster with the longer median time to reach the lowest heart rate as cluster 1, and the other cluster as cluster 2, corresponding to 64% and 36% of the sleep periods examined, respectively.
The two clusters also differ in terms of sleep stage composition. Cluster 1 is associated with shorter durations of deep (median percentage of the sleep period, 30 vs. 34%) and REM (20 vs. 22%) sleep and longer durations of light sleep (49 vs. 44%). There is no obvious difference in the distributions of the total sleep duration between the two clusters, which is confirmed by the Mann-Whitney U test (p = 0.18, Fig. 2f). Sleep periods in cluster 1 are also characterized by slightly longer sleep latency, earlier bedtime start and earlier bedtime end, higher average heart rate and lower average HRV. As the average HRV is highly negatively correlated with the average heart rate (online suppl. Table S3), we do not include it in the regression model (online suppl. Table S4). While the average respiratory rate variability was statistically significant in the regression model, we did not find this difference between the two clusters to be practically significant. Differences in the means and medians of the sleep metrics between the two clusters are summarized in Table 1.
Sleep measure/cluster . | Mean . | SD . | Median . | IQR . | ||||
---|---|---|---|---|---|---|---|---|
1 . | 2 . | 1 . | 2 . | 1 . | 2 . | 1 . | 2 . | |
Lowest HR time offset (% of sleep period) | 64.9 | 35.1 | 20.3 | 26.6 | 66.0 | 33.6 | 29.9 | 45.4 |
% of sleep period in deep sleep | 30.5 | 33.7 | 11.8 | 11.5 | 30.4 | 33.6 | 16.0 | 15.7 |
% of sleep period in REM sleep | 20.1 | 21.8 | 8.3 | 8.6 | 20.2 | 21.6 | 10.8 | 11.0 |
% of sleep period in light sleep | 49.4 | 44.5 | 10.8 | 10.6 | 49.1 | 44.1 | 14.9 | 14.8 |
Total sleep duration, h | 7.49 | 7.46 | 1.44 | 1.37 | 7.48 | 7.43 | 1.77 | 1.71 |
Sleep efficiency, % | 87.8 | 88.5 | 5.5 | 5.2 | 89.0 | 89.0 | 7.0 | 6.0 |
Sleep latency, min | 12.9 | 9.0 | 12.6 | 6.6 | 9.0 | 7.0 | 11.5 | 8.0 |
Bedtime start, h (from 12 mn) | 0.46 | 0.63 | 1.67 | 1.61 | 0.38 | 0.54 | 1.99 | 1.97 |
Bedtime end, h (from 12 mn) | 9.01 | 9.06 | 1.76 | 1.67 | 8.92 | 8.98 | 2.21 | 2.12 |
Bedtime duration, h | 8.54 | 8.44 | 1.60 | 1.54 | 8.52 | 8.43 | 1.92 | 1.88 |
Average respiratory rate, breaths/min | 15.6 | 15.5 | 1.7 | 1.6 | 15.5 | 15.4 | 2.4 | 2.1 |
Average respiratory rate variability, breaths/min | 3.35 | 3.36 | 0.68 | 0.70 | 3.25 | 3.25 | 0.875 | 0.875 |
Average heart rate, beats/min | 63.9 | 62.2 | 9.2 | 9.1 | 63.6 | 61.8 | 12.6 | 12.4 |
Average HRV, ms | 63.3 | 67.2 | 32.1 | 33.6 | 58.0 | 62.0 | 43.0 | 42.0 |
Sleep measure/cluster . | Mean . | SD . | Median . | IQR . | ||||
---|---|---|---|---|---|---|---|---|
1 . | 2 . | 1 . | 2 . | 1 . | 2 . | 1 . | 2 . | |
Lowest HR time offset (% of sleep period) | 64.9 | 35.1 | 20.3 | 26.6 | 66.0 | 33.6 | 29.9 | 45.4 |
% of sleep period in deep sleep | 30.5 | 33.7 | 11.8 | 11.5 | 30.4 | 33.6 | 16.0 | 15.7 |
% of sleep period in REM sleep | 20.1 | 21.8 | 8.3 | 8.6 | 20.2 | 21.6 | 10.8 | 11.0 |
% of sleep period in light sleep | 49.4 | 44.5 | 10.8 | 10.6 | 49.1 | 44.1 | 14.9 | 14.8 |
Total sleep duration, h | 7.49 | 7.46 | 1.44 | 1.37 | 7.48 | 7.43 | 1.77 | 1.71 |
Sleep efficiency, % | 87.8 | 88.5 | 5.5 | 5.2 | 89.0 | 89.0 | 7.0 | 6.0 |
Sleep latency, min | 12.9 | 9.0 | 12.6 | 6.6 | 9.0 | 7.0 | 11.5 | 8.0 |
Bedtime start, h (from 12 mn) | 0.46 | 0.63 | 1.67 | 1.61 | 0.38 | 0.54 | 1.99 | 1.97 |
Bedtime end, h (from 12 mn) | 9.01 | 9.06 | 1.76 | 1.67 | 8.92 | 8.98 | 2.21 | 2.12 |
Bedtime duration, h | 8.54 | 8.44 | 1.60 | 1.54 | 8.52 | 8.43 | 1.92 | 1.88 |
Average respiratory rate, breaths/min | 15.6 | 15.5 | 1.7 | 1.6 | 15.5 | 15.4 | 2.4 | 2.1 |
Average respiratory rate variability, breaths/min | 3.35 | 3.36 | 0.68 | 0.70 | 3.25 | 3.25 | 0.875 | 0.875 |
Average heart rate, beats/min | 63.9 | 62.2 | 9.2 | 9.1 | 63.6 | 61.8 | 12.6 | 12.4 |
Average HRV, ms | 63.3 | 67.2 | 32.1 | 33.6 | 58.0 | 62.0 | 43.0 | 42.0 |
Mental Health and Sleeping Heart Rate Curves
Logistic mixed-effects regression is used to reveal relationships between the cluster membership of a given sleep period and the associated individual’s demographic and mental health indicators. For this analysis, cluster label is the response and participant ID is a random effect. Adding the week number as either a random or a fixed effect, or excluding it entirely, resulted in similar coefficients and p values for the other predictors (Table 2 vs. online suppl. Table S5). We thus omit the week number in our final models.
Fixed effects . | Model with lone predictors . | Final model . | ||||||
---|---|---|---|---|---|---|---|---|
odds ratio . | 2.5% CI . | 97.5% CI . | p value . | odds ratio . | 2.5% CI . | 97.5% CI . | p value . | |
Gender (male) | 1.207 | 0.940 | 1.552 | 0.141 | 1.324 | 1.031 | 1.701 | 0.028 |
Gender (nonbinary) | 1.345 | 0.857 | 2.111 | 0.198 | 1.205 | 0.771 | 1.883 | 0.413 |
Race (non-white) | 0.942 | 0.680 | 1.304 | 0.718 | ||||
Impairment due to anxiety/depression | 1.538 | 1.226 | 1.929 | <0.001 | 1.477 | 1.163 | 1.875 | 0.001 |
Prior mental health diagnosis | 1.435 | 1.156 | 1.782 | 0.001 | ||||
Traumatic events experienced (≥2) | 1.453 | 1.167 | 1.809 | <0.001 | 1.329 | 1.061 | 1.664 | 0.013 |
Fixed effects . | Model with lone predictors . | Final model . | ||||||
---|---|---|---|---|---|---|---|---|
odds ratio . | 2.5% CI . | 97.5% CI . | p value . | odds ratio . | 2.5% CI . | 97.5% CI . | p value . | |
Gender (male) | 1.207 | 0.940 | 1.552 | 0.141 | 1.324 | 1.031 | 1.701 | 0.028 |
Gender (nonbinary) | 1.345 | 0.857 | 2.111 | 0.198 | 1.205 | 0.771 | 1.883 | 0.413 |
Race (non-white) | 0.942 | 0.680 | 1.304 | 0.718 | ||||
Impairment due to anxiety/depression | 1.538 | 1.226 | 1.929 | <0.001 | 1.477 | 1.163 | 1.875 | 0.001 |
Prior mental health diagnosis | 1.435 | 1.156 | 1.782 | 0.001 | ||||
Traumatic events experienced (≥2) | 1.453 | 1.167 | 1.809 | <0.001 | 1.329 | 1.061 | 1.664 | 0.013 |
. | Coeff . | 2.5% CI . | 97.5% CI . | p value . | . | . | . | . |
---|---|---|---|---|---|---|---|---|
Week number | 0.013 | −0.005 | 0.031 | 0.15 | ||||
PSS | −0.003 | −0.011 | 0.005 | 0.493 | ||||
GAD | −0.004 | −0.016 | 0.008 | 0.52 |
. | Coeff . | 2.5% CI . | 97.5% CI . | p value . | . | . | . | . |
---|---|---|---|---|---|---|---|---|
Week number | 0.013 | −0.005 | 0.031 | 0.15 | ||||
PSS | −0.003 | −0.011 | 0.005 | 0.493 | ||||
GAD | −0.004 | −0.016 | 0.008 | 0.52 |
For the dependent variable, cluster 1 is coded as 1 and cluster 2 is coded as 0.
The following predictors were considered fixed effects (Table S1): gender (68% female, 26% male, 6% other genders), race (88% white, 12% non-white), PSS scores, GAD-7 scores, existence of a prior mental health diagnosis (45% with, 55% without), the number of traumatic event categories experienced firsthand [54] (28% with 0, 32% with 1, 40% with ≥2), and impairment due to anxiety or depression (35% with, 65% without). We note that 96% of those with a prior mental health diagnosis reported anxiety or depression.
While prior mental health diagnosis and impairment are highly correlated (Spearman’s ρ = 0.8) and should not be used in the same model, we can test which of these two predictors produces a better fit. Similarly, PSS and GAD-7 scores are highly correlated (Spearman’s ρ = 0.7) so we only use one in any given model to determine the effect of stress or anxiety levels.
Having a prior mental health diagnosis, impairment, or firsthand experience in 2 or more traumatic events are highly significant (p ≤ 0.001) as lone predictors of the sleep period cluster. Gender is not statistically significant at α = 0.05 when used as a lone predictor or used together with traumatic events experienced but is statistically significant when used together with impairment or prior mental health diagnoses (Table 2). PSS scores, GAD-7 scores, and race are not statistically significant at α = 0.05, regardless of whether they are used as lone predictors or used in conjunction with others. Interaction effects between gender and impairment, as well as gender and traumatic events experienced, were not statistically significant when the main effects are also included.
For the final model (Table 2), we use impairment, traumatic events experienced, and gender as fixed effects. Impairment was highly associated with being in cluster 1, which is characterized by reaching the lowest HR later during sleep, as is having experienced 2 or more traumatic events. Being male is also associated with higher odds of being in cluster 1.
As a post hoc analysis (online suppl. Table S6), we also ran the regression models separately for males, females, and those who do not identify as either gender, which we denote here as “non-binary.” Impairment is associated with increased odds of being in cluster 1 in sleep periods among females, while the number of traumatic events (whether <2 or ≥2) is associated with increased odds of being in cluster 1 in sleep periods among females and nonbinary individuals. Both variables are not statistically significant for males. In addition, if we restrict the data to sleep periods of those with or without impairment, we find that the odds of being in cluster 1 among those without impairment are higher for males than for females. No gender effect is seen among those with impairment. On the other hand, gender is only a significant predictor for those with two or more traumatic events, with nonbinary individuals having sleep periods of higher odds of being in cluster 1, but not for those who experienced fewer than two.
With both the normalized and raw time to reach the lowest heart rate being main differentiators of the two clusters (Fig. 2a, b), we look at whether these variables are also associated with demographic information. Using linear mixed-effects regression with the participant ID as a random effect (online suppl. Table S7), we see that impairment continues to be a significant predictor for both the normalized time (p = 0.010) and raw time (p = 0.015). However, while gender (p = 0.001) and traumatic events (p = 0.021) are also significant predictors for normalized time, similar to what we observed for the cluster prediction, they are not significant in predicting raw time (p > 0.05). This indicates that while different genders with similar mental health information may reach the lowest HR at similar times, the difference in the shape of the heart rate curve can be attributed to the shorter sleep duration among males (online suppl. Fig. S9; online suppl. Table S9). On the other hand, the relationship between mental health and the time to reach the lowest heart rate is robust.
Predicting an Individual’s Mental Health Indicator from Sleep Period Cluster Data
With the main predictors not related to any of the weekly measures, we can aggregate our data at the individual level and predict mental health indicators from how often their sleep periods belong in a given cluster. Using logistic regression (Table 3), we find that having a higher fraction of sleep periods in cluster 1 is associated with higher odds of having impairment, a prior mental health diagnosis, or experience in 2 or more traumatic events. It is a statistically significant predictor of being female (vs. non-female). Still, this fraction is not significant in differentiating males and non-males or nonbinary individuals and those who are either male or female.
Response . | Coeff . | 2.5% CI . | 97.5% CI . | p value . |
---|---|---|---|---|
With impairment | 1.408 | 0.582 | 2.235 | <0.001 |
With mental health diagnosis | 1.177 | 0.404 | 1.949 | 0.003 |
With ≥2 traumatic events | 1.308 | 0.513 | 2.103 | 0.001 |
Gender (0 if male, 1 otherwise) | −0.705 | −1.583 | 0.172 | 0.115 |
Gender (0 if female, 1 otherwise) | 0.840 | 0.018 | 1.663 | 0.045 |
Gender (0 if nonbinary, 1 otherwise) | −0.832 | −2.440 | 0.776 | 0.31 |
Response . | Coeff . | 2.5% CI . | 97.5% CI . | p value . |
---|---|---|---|---|
With impairment | 1.408 | 0.582 | 2.235 | <0.001 |
With mental health diagnosis | 1.177 | 0.404 | 1.949 | 0.003 |
With ≥2 traumatic events | 1.308 | 0.513 | 2.103 | 0.001 |
Gender (0 if male, 1 otherwise) | −0.705 | −1.583 | 0.172 | 0.115 |
Gender (0 if female, 1 otherwise) | 0.840 | 0.018 | 1.663 | 0.045 |
Gender (0 if nonbinary, 1 otherwise) | −0.832 | −2.440 | 0.776 | 0.31 |
As gender is common demographic information to ask in health-related apps, we check whether this aids in predicting mental health indicators when used together with the fraction of sleep periods in cluster 1. This fraction and gender are statistically significant in predicting impairment and prior mental health diagnoses. However, in predicting experience in 2 or more traumatic events, gender is not statistically significant (see Table S8 for the detailed regression results).
We also perform a post hoc analysis to dig deeper into the effect of gender (Table 4). The fraction of sleep periods belonging to cluster 1 is a statistically significant predictor for impairment only for females; for traumatic events, it is statistically significant only for females and nonbinary individuals. In these cases, having more sleep periods in cluster 1 results in higher odds of having an impairment or experience in two or more traumatic events. This mirrors our earlier post hoc analysis in predicting the sleep period cluster based on the individual’s characteristics. One can get an intuition of the regression results from the composition of our data as given in Table 5 and online supplementary Figures S8, S9, and S10.
Subset . | Response . | Coeff . | 2.5% CI . | 97.5% CI . | p value . |
---|---|---|---|---|---|
Female only | With impairment | 1.556 | 0.605 | 2.506 | 0.001 |
Female only | With ≥2 traumatic events | 1.166 | 0.247 | 2.085 | 0.013 |
Male only | With impairment | 0.733 | −1.553 | 3.017 | 0.530 |
Male only | With ≥2 traumatic events | 1.236 | −0.604 | 3.076 | 0.188 |
Nonbinary only | With impairment | 2.803 | −0.371 | 5.977 | 0.083 |
Nonbinary only | With ≥2 traumatic events | 3.835 | 0.154 | 7.517 | 0.041 |
Subset . | Response . | Coeff . | 2.5% CI . | 97.5% CI . | p value . |
---|---|---|---|---|---|
Female only | With impairment | 1.556 | 0.605 | 2.506 | 0.001 |
Female only | With ≥2 traumatic events | 1.166 | 0.247 | 2.085 | 0.013 |
Male only | With impairment | 0.733 | −1.553 | 3.017 | 0.530 |
Male only | With ≥2 traumatic events | 1.236 | −0.604 | 3.076 | 0.188 |
Nonbinary only | With impairment | 2.803 | −0.371 | 5.977 | 0.083 |
Nonbinary only | With ≥2 traumatic events | 3.835 | 0.154 | 7.517 | 0.041 |
Gender . | Impairment . | Individuals . | Nights . | frac_1 . | Trauma . | Individuals . | Nights . | frac_1 . | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
size . | pct (%) . | size . | pct (%) . | mean (SD) . | median (IQR) . | size . | pct (%) . | size . | pct (%) . | mean (SD) . | median (IQR) . | |||
Female (68%) | 0 | 212 | 61.6 | 6,584 | 62.9 | 0.59 (0.24) | 0.62 (0.37) | <2 | 204 | 59.3 | 6,443 | 61.5 | 0.60 (0.25) | 0.62 (0.40) |
1 | 132 | 38.4 | 3,885 | 37.1 | 0.68 (0.24) | 0.72 (0.36) | ≥2 | 140 | 40.7 | 4,026 | 38.5 | 0.66 (0.23) | 0.69 (0.30) | |
Male (26%) | 0 | 106 | 82.2 | 3,027 | 84.1 | 0.66 (0.20) | 0.68 (0.25) | <2 | 83 | 64.3 | 2,359 | 65.5 | 0.65 (0.21) | 0.67 (0.29) |
1 | 23 | 17.8 | 574 | 16.0 | 0.69 (0.24) | 0.72 (0.33) | ≥2 | 46 | 35.7 | 1,242 | 34.5 | 0.70 (0.18) | 0.71 (0.22) | |
Nonbinary (6%) | 0 | 11 | 34.4 | 388 | 38.7 | 0.57 (0.29) | 0.66 (0.44) | <2 | 18 | 56.3 | 584 | 58.2 | 0.60 (0.24) | 0.65 (0.35) |
1 | 21 | 65.6 | 615 | 61.3 | 0.74 (0.21) | 0.76 (0.28) | ≥2 | 14 | 43.8 | 419 | 41.8 | 0.79 (0.23) | 0.88 (0.25) |
Gender . | Impairment . | Individuals . | Nights . | frac_1 . | Trauma . | Individuals . | Nights . | frac_1 . | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
size . | pct (%) . | size . | pct (%) . | mean (SD) . | median (IQR) . | size . | pct (%) . | size . | pct (%) . | mean (SD) . | median (IQR) . | |||
Female (68%) | 0 | 212 | 61.6 | 6,584 | 62.9 | 0.59 (0.24) | 0.62 (0.37) | <2 | 204 | 59.3 | 6,443 | 61.5 | 0.60 (0.25) | 0.62 (0.40) |
1 | 132 | 38.4 | 3,885 | 37.1 | 0.68 (0.24) | 0.72 (0.36) | ≥2 | 140 | 40.7 | 4,026 | 38.5 | 0.66 (0.23) | 0.69 (0.30) | |
Male (26%) | 0 | 106 | 82.2 | 3,027 | 84.1 | 0.66 (0.20) | 0.68 (0.25) | <2 | 83 | 64.3 | 2,359 | 65.5 | 0.65 (0.21) | 0.67 (0.29) |
1 | 23 | 17.8 | 574 | 16.0 | 0.69 (0.24) | 0.72 (0.33) | ≥2 | 46 | 35.7 | 1,242 | 34.5 | 0.70 (0.18) | 0.71 (0.22) | |
Nonbinary (6%) | 0 | 11 | 34.4 | 388 | 38.7 | 0.57 (0.29) | 0.66 (0.44) | <2 | 18 | 56.3 | 584 | 58.2 | 0.60 (0.24) | 0.65 (0.35) |
1 | 21 | 65.6 | 615 | 61.3 | 0.74 (0.21) | 0.76 (0.28) | ≥2 | 14 | 43.8 | 419 | 41.8 | 0.79 (0.23) | 0.88 (0.25) |
frac_1 is the fraction of sleep periods in cluster 1.
Discussion
Using wearable and self-reported health data from first-year university students, we study how heart rate changes over a sleep period and how these relate to mental health. We find two broad categories of sleeping heart rate curves mainly differentiated by when the lowest heart rate is attained. Sleep periods where the lowest heart rate is reached later are also characterized by shorter deep and REM sleep and longer light sleep, but not significantly different sleep duration. While studies tend to aggregate heart rate measurements into a single statistic (e.g., mean, minimum), these are only weakly correlated with the pattern of change in the sleeping heart rate, indicating that the shape of the sleeping heart rate curve contains new information outside of these aggregate values.
To our knowledge, the only other study on the shapes of sleeping heart rate curves was performed by Oura [64]. They found four shapes, contrasting with the two broad categories for which we found strong support. While the methodology and analysis in this study were not released, we were able to reproduce these four shapes by setting k = 4 in the k-means algorithm and taking the cluster centroids (online suppl. Fig. S3). However, for our dataset, setting k = 4 results in less consistent cluster labels with different training subsets or initializations, unlike the case of k = 2. Our analysis points to a spectrum of shapes, including the four shapes that Oura found that can be broadly categorized into two groups. It is worth noting that Oura’s analysis reflects several orders of magnitude more individuals, with far broader demographic variation.
We also find that these sleeping heart rate patterns are related to mental health indicators, particularly traumatic events experienced and impairment due to anxiety or depression, with the latter being highly correlated with having a prior mental health diagnosis. Individuals who self-report impairment or who have experienced two or more traumatic events [55] are more likely to attain the lowest heart rate later in sleep. The fraction of sleep periods of a participant in a given pattern is a significant predictor for impairment and the number of traumatic events experienced. Finding differential sleep patterns by mental health status is consistent with previous works [65‒67]. With the majority of the mental health diagnoses in our sample being anxiety or depression, our findings also point to links between these disorders and how heart rate changes during sleep.
While several studies show that concurrent stress and anxiety levels affect sleep [40, 68‒70], we find that weekly stress and anxiety scores are not statistically significant in predicting the sleeping heart rate curve pattern. This may be due to a difference in temporal resolution: sleep periods are monitored nightly, while the stress and anxiety levels are only obtained from a weekly self-report [53]. We are implementing more frequent surveys in future studies to ascertain whether daily fluctuations in stress or anxiety relate to how heart rate changes during sleep. Another possible explanation is that the heart rate signatures may have been formed after impairment or trauma and may have stabilized since. These signatures may not be as sensitive to weekly or daily fluctuations in stress or anxiety. More studies will have to be done to test this hypothesis.
We also observe differences across genders in how sleeping heart rate patterns relate to mental health indicators. Impairment and traumatic events experienced are both related to the sleeping heart rate clusters for females, but not for males. For nonbinary individuals, the sleeping heart rate patterns differ by experienced trauma only. Further, males, whether or not they have impairment or traumatic experiences, have higher odds of reaching the lowest heart rate later in sleep. Gender differences in sleep have been observed in prior studies [71‒74], although there are conflicting results [75] possibly due to different study designs. We also note that our sample is highly homogeneous in age, which is not the case in most research on gender differences in sleep. In summary, our results show that not only do we find different patterns in how the heart rate changes during sleep, but that these patterns are related to mental health, indicating that the shape of the heart rate curve is a viable but underexplored sleep metric.
We are interested in studying university students [76] as they are a population at risk [77] for which mental health interventions are highly relevant and more easily implementable [52‒54]. However, this sample limits the generalizability of our results in terms of demographics, sleep disorder prevalence [78], and life stressors [79]. We hope to address these limitations by expanding our recruitment to include a more diverse set of individuals in future work.
Acknowledgments
The manuscript benefited from helpful discussions with Alec Beauregard, Marco Altini, and Miguel Fudolig. A preprint version of this work is available on PsyArXiv. Mikaela Irene Fudolig, et al. The two fundamental shapes of sleep heart rate dynamics and their connection to mental health. PsyArxiv: https://doi.org/10.31234/osf.io/3cqdn (October 13, 2023).
Statement of Ethics
Participants were required to complete a comprehension assessment with completely correct answers before being able to provide written informed consent through REDCap, a HIPAA-compliant online application. This study protocol was reviewed and approved by the University of Vermont Institutional Review Board (protocol number 00002126).
Conflict of Interest Statement
All authors declare no financial or nonfinancial competing interests.
Funding Sources
This study was funded by a grant from the MassMutual Financial Group. MassMutual played no role in study design, data collection, analysis and interpretation of data, or the writing of this manuscript. This work was funded in part by the US NIH (MH123031, PI: EM).
Author Contributions
M.I.F., L.S.P.B., M.P., J.u.L., E.M., R.M., T.R., P.S.D., and C.D. designed the study. M.I.F., M.P., L.S.P.B., and E.M. performed the analysis. Y.M.B., J.E.H., J.K., J.o.L., and K.S. performed the data collection and cleaning. M.I.F. wrote the manuscript with inputs from all the authors. All authors approved the final version of the manuscript.
Data Availability Statement
The data to replicate most of the results are available through this public repository: https://doi.org/10.6084/m9.figshare.25877302. Due to the small size of minorities from which the identity of a participant may be inferred, information on the race of the participants will be shared on reasonable request to the corresponding author. We note that race was not found to be relevant in our results.