- 1Endocrinology and Nutrition Service, Hospital Universitario Príncipe de Asturias, Madrid, Spain
- 2Computer Architecture and Automation Department, Universidad Complutense de Madrid, Madrid, Spain
- 3Education Department, Universidad a Distancia de Madrid, Madrid, Spain
Background: Sleep quality disturbances are frequent in adults with type 1 diabetes. However, the possible influence of sleep problems on glycemic variability has yet to be studied in depth. This study aims to assess the influence of sleep quality on glycemic control.
Materials and methods: An observational study of 25 adults with type 1 diabetes, with simultaneous recording, for 14 days, of continuous glucose monitoring (Abbott FreeStyle Libre system) and a sleep study by wrist actigraphy (Fitbit Ionic device). The study analyzes, using artificial intelligence techniques, the relationship between the quality and structure of sleep with time in normo-, hypo-, and hyperglycemia ranges and with glycemic variability. The patients were also studied as a group, comparing patients with good and poor sleep quality.
Results: A total of 243 days/nights were analyzed, of which 77% (n = 189) were categorized as poor quality and 33% (n = 54) as good quality. Linear regression methods were used to find a correlation (r =0.8) between the variability of sleep efficiency and the variability of mean blood glucose. With clustering techniques, patients were grouped according to their sleep structure (characterizing this structure by the number of transitions between the different sleep phases). These clusters showed a relationship between time in range and sleep structure.
Conclusions: This study suggests that poor sleep quality is associated with lower time in range and greater glycemic variability, so improving sleep quality in patients with type 1 diabetes could improve their glycemic control.
1 Introduction
Poor sleep quality and insufficient amount of sleep are common in the general population and people with type 1 diabetes mellitus (T1DM) (1, 2). A shorter duration of the deep sleep phase (3, 4), subjective quality of sleep, excessive daytime sleepiness (1, 2), and higher prevalence of obstructive sleep apnea (5) have been demonstrated in both adults and children with T1DM. The impact of these disturbances on glycemic control in patients with T1DM is an area of increasing interest. Previous studies suggest that sleep disturbances decrease insulin sensitivity, worse glycemic control, and increase glycemic variability (6). Recently, the American Diabetes Association recommended the study of sleep patterns as part of clin-ical evaluation of a patient with T1DM (7). The main objective of this study is to investigate by machine learning techniques the relationship among sleep structure, sleep quantity and quality, and glycemic control in patients with T1DM.
Griggs et al. (2020) (8) found in 38 patients that a higher glucose variability was associated within-person with more sleep disruptions or worse sleep. Our work extends theirs by grouping sleep patterns and analyzing the influence on glucose values during the day. Feupe et al. (2013) (9) studied the relation-ship between deep sleep duration and HbA1c level and concluded that they are inversely correlated.
Some previous studies used signal processing techniques to study the influence of physical exercise during the day on the glucose evolution during the following night (10). To find coherence between the patient’s circadian rhythms, they used the cosinor technique (a technique used in circadian physiology) and wavelets. Another similar study using the wavelet coherence analysis is Griggs et al. (2022) (11). Other studies (12–15) found significant relations between variability in sleep duration and poor glycemic control.
Our study complements these works by including the different sleep states during the night, grouping them into repetitive patterns, and studying their influence on different metrics of the following day. We apply clustering techniques and language processing techniques.
2 Materials and methods
The study was approved by the ethics committee of the Príncipe de Asturias Hospital of Alcalá de Henares, Madrid, Spain. The research was compliant with the Declaration of Helsinki guidelines. Written consent was obtained from each participant prior to engagement.
2.1 Inclusion/exclusion criteria
Eligible participants were adults between 18 and 65 years with T1DM with at least one year of duration, being on treatment with an insulin pump or multiple doses of subcutaneous insulin per day (MDI), having the availability of a mobile device capable of reading the sensors of the FreeStyle Libre system, and giving informed consent for inclusion in the study. Pre-screened subjects were excluded if they were diagnosed with a significant psychiatric disorder. Subjects in treatment with corticoids or patients that have required hospitalization or surgery on the last six months were excluded.
2.2 Data gathering and preprocessing
The main objective of this study is to analyze the impact of sleep disturbances on short-term gly-cemic control, glycemic variability, and the frequency of hypoglycemia in a group of patients with T1DM. For this purpose, flash continuous glucose monitoring (performed by Abbott FreeStyle Libre devices) and a sleep study using wrist actigraphy (Fitbit Ionic device on the non-dominant wrist) were carried out simultaneously for 14 days in a group of patients. The CGM data includes interstitial blood glucose levels recorded during the entire time the patient wore the sensor, not only during sleep. Fitbit ionic devices incorporate a light sensor (photoplethysmography, PPG) and an accelerometer to identify sleep stages. From (16), “Fitbit uses proprietary sleep-staging machine learning algorithms applied to mo-tion, heart rate variability, and respiratory rate, with the last two calculated from heartbeat data sensed by PPG”. Twenty-five patients were included, although data from three patients had to be discarded, with a total of 243 nights/days recorded. The study analyzes interindividual and intraindividual differences in glycemic control concerning nights with worse or better quality/quantity of sleep.
Three visits were programmed to complete the collaboration of the participants. The study was explained to the participants in a first visit (Pre-screening Visit), and all patients signed an informed consent form. Participants were also committed to continuing with their usual treatment. In addition, sociodemographic variables, anthropometric data, and clinical data were collected from medical records. In a second visit, Visit 1, participants were given a wristband with wristwatch actigraphy (Fitbit Ionic device), and a FreeStyle Libre sensor (first generation, no alarms) was placed for continuous glucose monitoring for 14 days. The sensor was connected to the Abbot Libre View platform. Patients self-completed the Pittsburgh Sleep Quality Index (PSQI) questionnaire to assess habitual self-perceived sleep quality (1). Visit 1 took place between 1 and 30 days after the pre-screening visit. Finally, during Visit 2, the glucose sensor and wrist actigraphy were removed. Visit 2 was programmed to be held 15 days after Visit 1. During this period, participants could contact the study’s technical staff to solve any technical concerns.
PSQI examines seven components: sleep quality, latency, habitual sleep efficiency, sleep duration, sleep disturbances, use of sleep medication, and daytime dysfunction. With 19 questions, participants rate the components on a scale of 0 to 3, ranging from 0 to 21, with higher scores indicating worse sleep quality (>5 reveal poor sleepers).
Recording of blood glucose data was performed through the Abbott Libre View application. Time-in-range is estimated directly by the FreeStyle Libre systems. In addition, we calculated it from the microdata generated by the meter using the Rosendaal method (17), which assumes a linear progression between two glucose values and calculates the specific value for each minute (linear interpolation). The same method was used to calculate time in hypo and hyperglycemia. The recording of the wrist activity was also performed automatically and digitized by the Fitbit mobile application. Microdata is not available directly from Fitbit, so we adapted the API (Application Program Interface) for recovering detailed information (1).
Glucose sensors were placed on the arm, and the Fitbit device was worn on the non-dominant wrist. The Fitbit and glucose data were synchronized at the closest multiple of 5 minutes. Once synchronized, sleep times spent in each stage were added to resynchronize with the 15 minutes used by FreeStyle Libre data. Days with gaps higher than one hour and a half in glucose were discarded. Fitbit data presented some outliers in sleeping times, mixing nap and night sleeping times for some days. Those days were eliminated manually. Heart rate, steps, and burned calories were collected and synchronized for future studies. Limitations of Fitbit Ionic devices are discussed in section 5
The glucose monitoring variables analyzed in this study are: time-in-range 70-180 mg/dl (TR) in percentage, mean blood glucose (mg/dl) (Mean_glucose), standard deviation (SD), coefficient of vari-ation (CV), percentage of time spent in level 1 hypoglycemia (55-70 mg/dl) and level 2 hypoglycemia (< 55 mg/dl) (T Hypo), time in hyperglycemia level 1 (180-250 mg/dl) and level 2 (> 250 mg/dl) (T Hyper), number of hypoglycemia/hyperglycemia episodes with at least 15 min of duration, Mean Amplitude of Glycemic Excursions (MAGE) and Mean Daily Glucose Differences (MDGD).
2.3 Methodology
Figure 1 shows the workflow we have used in this study. First, we recorded the 24-hour time series of blood glucose levels (box B) and the sleep state sequences during the corresponding nights of the par-ticipants in the study (box A). After performing the clustering (subsection 2.4) according to the structure of sleep states (box C), we consequently grouped the daily time series of glucose levels corresponding to the nights of each cluster (box D). Then, the glucose time series were averaged by cluster (box E), and we obtained the dynamics of the glucose level that characterize each cluster. As a final phase, the behavior of the clusters is studied in two different ways: on the one hand, a language processing tech-nique is applied to find similarities and dissimilarities (subsection 2.5) in the glucose time series (box F) and, on the other hand, a statistical analysis (subsection 2.6) is performed to compare the glycemic characteristics between clusters (box G).
Figure 1 Sequence of steps for the development of our study: recording of sleep states and glucose levels (A, B), clustering (C), characterizing cluster glucose behavior (D, E), finding specific glucose patterns (F) and comparison of glucose characteristics (G). 1https://python-fitbit.readthedocs.io/en/latest/.
2.4 Analysis of the sequence of sleep states
Throughout the night, the person transits between different sleep states (wake, light, rem, deep), forming a time series of states or categories (18). Figure 1 (box A) presents this time series as a sequence of colors displaying the sleep states. Each sleep state is represented by a color.
In this study, we want to determine whether there are patterns in the sleep time series during nights that correlate to patterns of blood glucose level evolution of the following day. To search for sleep patterns, we tried different time series clustering techniques (19). Clustering is a group of machine learning techniques that identify clusters in the data. A cluster is a group or subset of elements of a population.
In this work, we applied clustering to group the nights of the participants based on the sequence of sleep states, i.e., each cluster includes those temporal sequences that are most similar to each other (18). Subsequently, we analyzed the evolution of glucose during the following day for each cluster. Finally, we analyzed specific and expected behaviors in the diurnal evolution of glucose values for the different clusters. This last step is explained in more detail in subsection 2.5.
Figure 1 (box C) illustrates the result of applying clustering to the sleep data in four clusters, i.e., four sleep behavior patterns of the study participants.
2.5 Similarity among glucose time series
Figure 1 (box E) shows each cluster’s average glucose time series. To identify specific behaviors of each cluster, we applied techniques commonly used in language processing (20, 21). To do this, we trans-form a time series of numerical glucose values into a sequence of symbols. These symbols are obtained after the time series is normalized and reduced by obtaining the average of a number n of glucose values (in this work, n =4) (Piecewise Aggregate Approximation, PAA) (22). A symbol is assigned to each aver-aged point within a dictionary based on the statistical distribution (Symbolic Aggregate approXimation, SAX) (20, 21). Finally, the symbols are grouped into words of a specific size (12 in this work).
Next, we identify behaviors specific to each cluster and those familiar to all clusters. Based on the number of occurrences of each “word” in all the time series of each cluster, we obtain the weight vectors associated with each word [Term Frequency -Inverse Document Frequency (23)]. Thanks to the weight vectors, we calculate the cosine similarity (24) and use this value to know if a word is specific to a cluster. In the average time series, we show those cluster-specific segments in cool colors (dark and light blue) and warm colors (red and orange) the similar segments across all clusters. The concept is that words with a very high frequency of occurrence in one cluster and a shallow frequency in the others appear in blue, whether the word appears a lot in all the clusters appears in orange or red. If the occurrence in the other clusters is medium, the color is green or yellow. Hence, we can identify the dynamics of glucose that characterizes a cluster. In Figure 1 (box F), we present a summary of the process for words of size
2.6 Statistical methods
In order to find out the possible relationship between the glucose levels and the quality of sleep, several cluster analyses and correlational studies were performed using the R language and related libraries (18, 25). These types of models, together with language processing techniques taken from the field of artificial intelligence, make it possible to determine possible patterns between the different variables selected and the nocturnal sleep patterns (26).
On the one hand, the K-means algorithm is used in the various cluster analyses among available data (27): first, considering the variables associated with sleep alone, then the variables associated with glucose levels, and finally, the set of all variables. On the other hand, the correlation analysis takes as a reference Pearson’s correlation coefficient. These values have been obtained after processing these glucose records with the R Package gluvarpro (28).
To compare the glycemic characteristics of clusters, we used Welch’s F-test (29) using the package from Dag et al. (2018) (30). We performed pairwise tests using Bonferroni’s correction (31, 32) for the p-values to calculate pairwise differences for each variable between the scores of each cluster (using the same package as before). In addition, we used Shannon’s entropy (33) for analyzing the results of the clustering. Shannon’s entropy provides an idea of how ordered sleep was. Higher values of entropy indicate higher levels of disorder.
3 Results
3.1 Participant characteristics
Twenty-five subjects participated in this study, of whom fourteen were female and eleven were male. Table 1 shows the characteristics of the participants identified by a random ID and including gender (M=Male; F=Female), age, BMI, HbA1c, diabetes treatment (MDI: Multiples doses of insulin; CSII: Continuous subcutaneous insulin infusion), and years of evolution of T1DM.
Table 1 Characteristics of the participants: ID, Gender (M, Male; F, Female; Sex assigned at birth coincides with gender identity for all participants), Age, BMI, HbA1c, Treatment (MDI, Multiples doses of insulin; ISCI, Infusion Subcutaneal continuous of insulin); Years of evolution of T1DM.
The mean age is 38.3 years, with an age range of 18-60.8 years, while the first and third quartiles are 26.4 and 47.9 years. The mean duration of diabetes is 18.1 years with a range of 0.8-39.5 years, and the first/third quartiles are 11.2/24.2 years. HbA1c mean is 7.4% (range 6-9.7%) and 1st/3rd quartiles are 7/7.8%. Body Mass Index (BMI) mean is 24.4 (range 18.5-32.2) and 1st/3rd quartiles are 22.3/26.3. Fifteen patients were on continuous insulin pump therapy, and ten were on multiple daily insulin doses. The CGM shows a mean blood glucose of 155 mg/dl, high glycemic variability (CV 36), and a time in hypo and hyperglycemia above target.
3.2 Pittsburgh questionnaire results
Table 2 shows the results of the Pittsburgh questionnaire. The results of the PSQI give a poor overall sleep quality in 12/23 patients, being these results concordant with the objective assessment of the actigraphy. Sleep disturbances contribute most to the high PSQI score (sudden nocturnal awakenings or other reasons like heat, cold, pain, nightmares, snoring, coughing, or the need to urinate). This result is also concordant with the actigraphy results, where the mean duration of objective nocturnal awakenings (WASO) is 52 minutes. Nine patients report significant daytime dysfunction (score >1) regarding drowsiness or poor mood for daily activities. One of the participants was discarded because he/she worked in shifts.
3.3 Sleep and glycemic control characteristics
Table 3 presents the values of the sleep monitoring variables for the participants of the study. Al-though most participants have a sleep efficiency higher than 90%, there are also 3 cases with a value close to 45% and two others with low-efficiency values (58% and 68%). Sleep data from some parti-cipants, such as HUPA007 or HUPA008, were discarded due to inconsistency in the reported data.
Following the consensus on sleep quality assessment of the National Sleep Foundation (34), three vari-ables were used for evaluating the sleep quality: the number of awakenings during the night, WASO or Wake After Sleep Onset and the sleep efficiency (as the ration of total sleep time to time in bed (35).
Table 4 shows the sleep characteristics of the participant. Sleep quality was categorized as poor if at least two of three mentioned criteria were met, i.e., sleep efficiency < 85% or Wake After Sleep Onset (WASO) > 40 min or a number of awakenings > 4. The sleep characteristics of the participants show large inter-individual differences, and only 48% of the patients have a good overall sleep quality, although the mean sleep duration is not low (mean of 7.15 hours). Of the 243 nights analyzed, 77% (n = 189) were of poor sleep quality and 33% (n = 54) of good quality. It should be noted that eight patients had no night with good sleep quality. The factor that most determined poor sleep quality was the duration of nighttime awakenings, with a mean of 52.81 minutes.
Table 4 Participants characteristics Sleep quality was categorized as ’poor’ if at least two of three criteria were met, i.e., sleep efficiency < 85% or WASO > 40 min or number of awakenings > 4, based on the National Sleep Foundation’s consensus recommendations for sleep quality assessment.
Table 5 shows the percentages of time spent in sleep phases of Light, REM and Deep. Light phases percentage ranges from 45% to 60.8% with an average of 54.14%. The average time spent in the Deep phase is 15.08%, with a maximum of 20.19% and a minimum of 11.72%. Finally, participants spent an average of 18.49% of the time in bed in the REM phase, ranging from 8.62% to 27.24%.
Table 6 shows the overnight glycemic characteristics of the participants. Patients presented low values of time in range, with an average of 59.97 ± 14.74%, which is an indication of poor glycemic control. The high values of the average CV (36.45 ± 8.76) and standard deviation of the mean glucose (55.85 ± 14.) are also concordant with this appreciation.
3.4 Association between sleep quality and blood glucose
In Figure 2, the upper triangular view of the correlation matrix for different variables recorded in this study is displayed as a correlogram. Red/blue colors for showing negative/positive correlation, and low/high intensity indicating the absolute value of the correlation. In addition to the expected correlations, we can point out several facts. Both poor and good sleep qualities have no significant correlation with any other variable. A positive correlation of 0.8 was found between the standard deviation of sleep efficiency and the standard deviation of mean blood glucose. In addition, the standard deviation of sleep efficiency has a positive correlation (0.66/0.62/0.65/0.61) with the standard deviation of glucose, the coefficient of variation, the time in range, and the time in hyperglycemia. There is a positive correlation (0.55) between the coefficient of variation and the mean time spent in hypoglycemia.
As mentioned, we used the clustering techniques to find patterns in sleep behavior. We experi-mented with a different number of clusters, having found k =4 to be the best option, showing a clear relationship between sleep structure and glucose variables. With k =3, we have a cluster with very broad glucose patterns, whereas, with k =5, the relationship between sleep structure and the different glucose variables is confirmed with no additional information, remaining the main clusters the same. With k =4, the number of nights grouped in each cluster was: 33, 78, 41 and 91.
In the left column of Figure 3, we can see the four sleep clusters, while the right column shows the average glucose dynamics in the days corresponding to each cluster. Remind that in the right column, the specificity of the glucose patterns is shown with intense blue color, while the patterns common to all clusters are shown in red. Because we take glucose level samples every 15 minutes, we have 96 samples per day. In the horizontal axis, we mark the main hourly correspondences. In order to correctly compare the sleep clusters, we show a total of 44 possible states per night (horizontal axis, on the left column).
Figure 3 Analysis of specific patterns for each cluster. (A) Sleep States for cluster 1 (33 nights) (B) Average glucose behavior for cluster 1. (C) Sleep States for cluster 2 (78 nights) (D) Average glucose behavior for cluster 2. (E) Sleep States for cluster 3 (41 nights) (F) Average glucose behavior for cluster 3. (G) Sleep States for cluster 4 (91 nights) (H) Average glucose behavior for cluster 4.
We calculated the Shannon’s entropy for the four clusters resulting in the following order (from highest entropy to lowest): 1,3, 2, and 4. Figure 4 shows the results of the main glucose variables for each cluster. On the one hand, the four clusters have slightly different sample sizes. On the other hand, we cannot assume that the clusters will have the same variance. The result of Welch’s F-test indicates that we can reject the null hypothesis that each cluster has the same mean value.
Figure 4 Main glucose related results for four clusters in Figure 3. (A) Time in Range (B) Time in Hypoglycemia. (C) Time in Hyperglycemia (D) Coefficient of variation. (E) Mean level of Glucose (F) Standard Deviation of glucose levels.
After the statistical tests with Bonferroni’s correction, we obtain several observations. Regarding time in Range, there is statistical significance between Cluster 1 and Cluster 4. We found significant differences for Cluster 1 and Cluster 2, versus Cluster 3 and Cluster 4 in time in hypoglycemia, and for Cluster 3 versus Cluster 2 and Cluster 4 in time in hyperglycemia. Cluster 1 and Cluster 4 are also significantly different in terms of CV. For the mean of glucose values, despite Welch’s F-test, the pairwise tests found no significant differences. One explanation could be that the applied Bonferroni’s adjustment was too severe (36, 37). Another variable related to glucose variability, the standard deviation of glucose levels, presented significant differences for Cluster 1 and Cluster 3 versus Cluster 2 and Cluster 4. So, from these statistical results and the parallel observation of Figures (3 and 4 several conclusions arose. Clusters 1 and 2 (Figures 3A, C) have the longest sleep state sequences, the highest nocturnal glucose levels and a maximum peak around noon. Clusters 3 and 4 (Figures 3E, G), with the shortest sleep state sequences have the lowest nocturnal glucose levels and a maximum peak around sunset. In addition, these are the two clusters with the lowest time in hypoglycemia (Figure 4B). In the case of Cluster 3, this is mainly because this cluster has the longest time in hyperglycemia (Figure 4C), while Cluster 4 is the cluster with the longest time in range (Figure 4A). Cluster 1, with the highest Shannon’s entropy and the longest sequence of states (40), has as distinctive characteristic a very pronounced drop in glucose levels prior to the night and, at the same time, the most accentuated nocturnal rise (displayed in dark blue in Figure 3B). In addition, it is the cluster with the lowest time in range (Figure 4A), the highest time in hypoglycemia (Figure 4B), coefficient of variation (Figure 4D) and standard deviation (Figure 4F). Cluster 3, with the shortest sleep sequence (16 states), has the unique characteristic of a pronounced drop in glucose level during the night (Figure 3F). It is also the cluster with the highest time in hyperglycemia (Figure 4C) and, therefore, the highest mean level of glucose (Figure 4E). In Figure 4F, we can see that the lowest standard deviation corresponds to clusters 2 and 4. This could be related to the fact that these two clusters have the sleep state sequences with the lowest Shannon’s entropy. The shortest time in hyperglycemia and therefore lower mean glucose level (Figures 4C, E) corresponds to Cluster 2, which has a low level of Shannon’s entropy and a medium length of the sleep state sequence (Figure 3C).
4 Discussion
This study shows that in adults with T1DM, subjective and objectively assessed sleep quality is poor, as occurs in 77% nights analyzed with actigraphy and 52% patients report Pittsburgh index > 5. In a previous epidemiological study using the Pittsburgh survey to measure subjective sleep quality (1) in a sample of 222 patients, authors found that 41% have poor sleep quality (Pittsburgh index >5). According to our study’s observational data, sleep quality variability in adults with type 1 diabetes is associated with more significant variability in nocturnal blood glucose levels.
Similar findings have been reported in a group of adolescent patients using actigraphy and CGM, where sleep fragmentation, earlier awakening, and longer duration of WASO are associated with greater glycemic variability and longer time in hypoglycemia (8).
To our best knowledge, this is one of the first studies using machine learning techniques to analyze the relationship between sleep structure and times in normo-, hypo-, and hyperglycemia and to show that better sleep structure is associated with longer time in the glycemic range during that day. Our results confirm those of a previous study in 20 adult patients (38), showing that poor sleep quality is associated with greater glycemic variability. However, they found no association between sleep quality and time in range. This study only analyzes the relationship between sleep quality and glycemia with a linear mixed-effects model. The application of machine learning clustering reveals that nights with a higher disorder of the sleep structure presented lower time in range and a higher percentage of time in hypoglycemia. Increased time in the deep sleep phase was correlated with lower HBA1c and less time in nocturnal hypoglycemia in a previous study (9).
Other previous studies that do not use continuous glucose monitoring also suggest that sleep disturb-ances worsen glucose control. In particular, patients with short sleep duration (<6.5 hours) reported higher HbA1c than patients with longer sleep duration (>6.5 hours) (14). Social jet lag (major changes in the duration and timing of sleep between weekdays and holidays) was associated with worse chronic metabolic control (39). Some studies demonstrate the influence of sleep quality or duration on glycemic control in children. However, the findings among the different authors are not the same: it has been reported that a longer duration of the light sleep phase is associated with higher mean daily blood glucose, more episodes of hyperglycemia, and higher HbA1c (4), and that increased nocturnal awakenings (40) correlate with high glycemic variability.
Most of these studies have limitations in that they were conducted on a small number of patients, some only used subjective sleep assessments, and only two studies in adults simultaneously performed continuous glucose monitoring and polysomnography.
There are several possible mechanisms involved in poorer glycemic control (41). Decreasing the duration of the REM phase would produce lower nocturnal glucose consumption, given that in the cerebral REM phase, glucose consumption is similar to awake. In contrast, in the cerebral non-REM phase, glucose consumption is much lower. In the general population and patients with diabetes, sleep deprivation, fragmentation, and decreased deep sleep are associated with decreased insulin sensitivity, possibly mediated by increased cortisol and Growth hormone (GH) levels. In patients with T1DM, higher nocturnal levels of growth hormone, adrenaline, ACTH, and cortisol than in the control population have been reported (3). In an experimental study, the partial restriction of a single night of sleep (4 hours) de-creased peripheral insulin sensitivity measured by the hyperinsulinemic-euglycemic clamp in patients with T1DM (42).
Although it has been proposed that continuous glucose monitoring may alter sleep quality due to hyper-or hypoglycemia alarms, in this study, the CGM did not have alarms, so the likelihood of inter-ference of the CGM on sleep quality is very low. Finally, sleep disturbances could worsen glycemic control by an indirect mechanism related to patients’ behavior and cognitive functions. An association has been described in children and teenagers between a shorter duration of sleep and a decrease in the frequency of self-monitoring and insulin bolus administration (43).
5 Limitations
The use of Fitbit devices is controversial. The previous generation of Fitbit devices was equipped only with body movement sensors and, therefore, were unsuitable for recording sleep stages. How-ever, new generations incorporated heart rate recording and a light sensor, so the Fitbit Ionic models greatly improved the ability to identify sleep stages. In fact, they are considered sleep-staging models (16). However, the data is not available directly from the web. Instead, programming an API is necessary to obtain the data. Although the code was tested thoroughly, a deeper validation with other wrist devices of higher complexity would be beneficial. Recently evaluations of several commercial sleep technologies during sleeping concluded that Fitbit ionic measured with greater accuracy and limited bias Total sleep time (TST), total wake time (TWT), and sleep efficiency (SE). Regarding sleep, stages were reported poor for the time spent in REM sleep and with lower error in the other two stages (44). We did not find other validation studies for Fitbit Ionic. The sample size of n=22 should be considered when evaluat-ing the results and conclusions presented in this work. Although all of the participants are adults and sleep recommendations are not different throughout adulthood, it would be necessary to study better the differences on sleep patterns based on age.
This study did not look at possible differences between patients treated with MDI or CSII. Separating patients by treatment would further reduce the number of nights used to analyze each group as we clustered by night rather than by patient. Future work should include larger samples to investigate such possible relationships.
6 Conclusion
To our best knowledge, our work is the first study that, using artificial intelligence and statistical techniques, has found a relationship between sleep structure and times in normo-, hypo-, and hypergly-cemia. Our main conclusion is that better sleep structure is associated with a longer time in the glycemic range. Future studies are needed to confirm these findings in a larger patient population and investigate the mechanisms involved in the decreased time in range and increased glycaemic variability caused by poor sleep quality. We believe that sleep disturbances should be a factor to be assessed in the clinical practice of patients with type 1 diabetes and that strategies should be designed to treat these disturbances. As future work, we are considering conducting a study to investigate further the relationship between sleep and glycemia by age group. Intuitively, variables affected by age, such as habits, responsibilities, social influences, etc., may produce significant differences in sleep patterns and diabetes outcomes.
Data availability statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
Ethics statement
The studies involving human participants were reviewed and approved by Hospital Universitario Príncipe de Asturias. The patients/participants provided their written informed consent to participate in this study.
Author contributions
MB-S: Experimental design. Medical analysis. JV: AI techniques, programming, figures, writting. AS-S: statistical analysis OG: AI analysis, writing JIH: AI analysis, writing and Funding. All authors contributed to the article and approved the submitted version.
Funding
This work has been supported by: Fundación Eugenio Rodriguez Pascual 2019 grant -Desarrollo de sistemas adaptativos y bioin-spirados para el control glucémico con infusores subcutáneos continuos de insulina y monitores continuos de glucosa (Development of adaptive and bioinspired systems for glycemic control with continuous subcutaneous insulin infusors and continuous glucose monitors). The Spanish Ministerio de Innovación Ciencia y Universidad -grants PID2021-125549OB-I00, PDC2022-133429-I00 and RTI2018-095180-B-I00. Madrid Regional Government -FEDER grants B2017/BMD3773 (GenObIA-CM) and Y2018/NMT-4668 (Micro-Stress-MAP-CM).
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1. Denic-Roberts H, Costacou T, Orchard TJ. Subjective sleep disturbances and glycemic control inadults with long-standing type 1 diabetes: The pittsburgh’s epidemiology of diabetes complicationsstudy. Diabetes Res Clin Pract (2016), 119:1–12. doi: 10.1016/j.diabres.2016.06.013
2. van Dijk M, Donga E, van Dijk JG, Lammers GJ, van Kralingen KW, Dekkers OM, et al. Disturbedsubjective sleep characteristics in adult patients with long-standing type 1 diabetes mellitus. Diabet-ologia (2011) 54(8):1967–76. doi: 10.1007/s00125-011-2184-7
3. Jauch-Chara K, Schmid SM, Hallschmid M, Born J, Schultes B. Altered neuroendocrine sleep archi-tecture in patients with type 1 diabetes. Diabetes Care (2008) 31(6):1183–8. doi: 10.2337/dc07-1986
4. Perfect MM, Patel PG, Scott RE, Wheeler MD, Patel C, Griffin K, et al. Sleep, glucose, and daytimefunctioning in youth with type 1 diabetes. Sleep (2012) 35(1):81–8. doi: 10.5665/sleep.1590
5. Borel A, Benhamou P, Baguet J, Halimi S, Levy P, Mallion J, et al. High prevalence of obstruct-ive sleep apnoea syndrome in a type 1 diabetic adult population: A pilot study. Diabetes Med (2010) 27(1328-9):1328–9. doi: 10.1111/j.1464-5491.2010.03096.x
6. Koren D, O’Sullivan KL, Mokhlesi B. Metabolic and glycemic sequelae of sleep disturbances inchildren and adults. Curr Diabetes Rep (2015) 15(1):562. doi: 10.1007/s11892-014-0562-5
7. Draznin B, Aroda VR, Bakris G, Benson G, Brown FM, Freeman R, et al. 4. comprehensive MedicalEvaluation and assessment of comorbidities: Standards of medical care in diabetes-2022. DiabetesCare (2022) 45(Supplement_1):S46–59. doi: 10.2337/dc22-S004
8. Griggs S, Redeker NS, Jeon S, Grey M. Daily variations in sleep and glucose in adolescents with type1 diabetes. Pediatr Diabetes (2020) 21(8):1493–501. doi: 10.1111/pedi.13117
9. Feupe SF, Frias PF, Mednick SC, McDevitt EA, Heintzman ND. Nocturnal continuous glucose andsleep stage data in adults with type 1 diabetes in real-world conditions. J Diabetes Sci Technol (2013) 7(5):1337–45. doi: 10.1177/193229681300700525
10. Farabi SS, Carley DW, Quinn L. Glucose variations and activity are strongly coupled in sleep and wake in young adults with type 1 diabetes. Biol Res Nurs (2017) 19(3):249–57. doi: 10.1177/1099800416685177
11. Griggs S, Barbato E, Hernandez E, Gupta D, Margevicius S, Grey M, et al. Glucose and unstructured physical activity coupling during sleep and wake in young adults with type 1 diabetes. Sci Rep (2022) 12(1):5790. doi: 10.1038/s41598-022-09728-2
12. Patel NJ, Savin KL, Kahanda SN, Malow BA, Williams LA, Lochbihler G, et al. Sleep habits in adolescents with type 1 diabetes: Variability in sleep duration linked with glycemic control. Pediatr Diabetes (2018) 1100–6. doi: 10.1111/pedi.12689
13. Chontong S, Saetung S, Reutrakul S. Higher sleep variability is associated with poorer glycaemic control in patients with type 1 diabetes. J Sleep Res (2016) 25(4):438–44. doi: 10.1111/jsr.12393
14. Borel AL, Pépin JL, Nasse L, Baguet JP, Netter S, Benhamou PY. Short sleep duration measured by wrist actimetry is associated with deteriorated glycemic control in type 1 diabetes. Diabetes Care (2013) 36(10):2902–8. doi: 10.2337/dc12-2038
15. Griggs S, Grey M, Strohl KP, Crawford SL, Margevicius S, Kashyap SR, et al. Variations in sleep characteristics and glucose regulation in young adults with type 1 diabetes. J Clin Endocrinol Metab (2022) 107(3):e1085-95. doi: 10.1210/clinem/dgab771
16. Haghayegh S, Khoshnevis S, Smolensky MH, Diller KR, Castriotta RJ. Accuracy of wristband fit-bit models in assessing sleep: Systematic review and meta-analysis. J Med Internet Res (2019) 21(11):e16273. doi: 10.2196/16273
17. Rosendaal FR, Cannegieter SC, van der Meer FJ, Briët E. A method to determine the optimal intensity of oral anticoagulant therapy. Thromb Haemost (1993) 69(3):236–9. doi: 10.1055/s-0038-1651587
18. Gabadinho A, Ritschard G, Müller NS, Studer M. Analyzing and visualizing state sequences in r with TraMineR. J Stat Software (2011) 40(4):1–37. doi: 10.18637/jss.v040.i04
19. Patel P, Keogh E, Lin J, Lonardi S. (2002). Mining motifs in massive time series databases, in: In: Proceed-ings of the 2002 IEEE International Conference on Data Mining. ICDM ‘02, USA. p. 370. Maebashi City, Japan: IEEE Computer Society. Available at: http://ieeexplore.ieee.org/servlet/opac?punumber=8435.
20. Zan CT, Yamana H. An improved symbolic aggregate approximation distance measure based on its statistical features. In: In: Proceedings of the 18th international conference on information integ-ration and web-based applications and services. iiWAS ‘16. New York, NY, USA: Association for Computing Machinery (2016). p. 72–80. Available at: https://doi.org/10.1145/3011141.3011146.
21. Keogh EJ, Pazzani MJ. Journal: Knowledge and Information Systems (2001) 3, 263–86 Springer-Verlag, Germany. doi: 10.1007/PL00011669
22. Guo C, Li H, Pan D. An improved piecewise aggregate approximation based on statistical features for time series mining. In: In: Proceedings of the 4th international conference on knowledge science, engineering and management. KSEM’10. Berlin, Heidelberg: Springer-Verlag (2010). p. 234–44.
23. Beel J, Langer S, Gipp B. TF-IDuF: A novel term-weighting sheme for user modeling based on users’ personal document collections. In: Proceedings of the iConference 2017. Wuhan, China (2017). Available at: http://ischools.org/the-iconference/.
24. Novotný V. Implementation notes for the soft cosine measure. CoRR. 2018;abs/1808.09407 (2018). Available from: http://arxiv.org/abs/1808.09407.
25. R Core Team. R: A language and environment for statistical computing. Vienna, Austria (2021). Available at: https://www.R-project.org/.
26. Jurafsky D, Martin JH. Speech and language processing : an introduction to natural language pro-cessing, computational linguistics, and speech recognition. Upper Saddle River, N.J: Pearson Pren-tice Hall (2009). Available at: http://www.amazon.com/Speech-Language-Processing-2nd-Edition/dp/0131873210/ref=pd_bxgy_b_img_y.
27. Lloyd S. Least squares quantization in PCM. IEEE Trans Inf Theory (1982) 28(2):129–37. doi: 10.1109/TIT.1982.1056489
28. Contador S. Gluvarpro: Glucose variability measures from continuous glucose monitoring data; 2020. R package version 4.0 (2020). Available at: https://CRAN.R-project.org/package=gluvarpro.
29. Delacre M, Lakens D, Leys C. Why psychologists should by default use welch’s f-test instead of student’s t-test. Int Rev Soc Psychol (2017) 30(1):92. doi: 10.5334/irsp.82
30. Dag O, Dolgun A, Konar NM. Onewaytests: An r package for one-way tests in independent groups designs. R J (2018) 10(1):175–99. doi: 10.32614/RJ-2018-022
31. Haynes W, Dubitzky W, Wolkenhauer O, KH C, Yokota H. Bonferroni correc-tion Vol. p. . New York, NY: Springer New York (2013) p. 154–4. doi: 10.1007/978-1-4419-9863-7_1213
32. Armstrong RA. When to use the bonferroni correction. Ophthalmic Physiol Optics (2014) 34(5):502–8. doi: 10.1111/opo.12131
33. Shannon CE. A mathematical theory of communication. Bell System Tech J (1948) 27(4):623–56. doi: 10.1002/j.1538-7305.1948.tb00917.x
34. Ohayon M, Wickwire EM, Hirshkowitz M, Albert SM, Avidan A, Daly FJ, et al. National sleep foundation’s sleep quality recommendations: first report. Sleep Health (2017) 3(1):6–19. doi: 10.1016/j.sleh.2016.11.006
35. Reed DL, Sacco WP. Measuring sleep efficiency: What should the denominator be? J Clin Sleep Med (2016) 12(2):263–6. doi: 10.5664/jcsm.5498
36. Abdi H. Bonferroni and sidak corrections for multiple comparisons. In: Salkind NJ, editor. Encyclo-pedia of measurement and statistics. Sage, Thousand Oaks, CA (2007). p. 103–7.
37. Lee S, Lee DK. What is the proper way to apply the multiple comparison test? Korean J Anesthesiol (2020) 73(6):572. doi: 10.4097/kja.d.18.00242.e1
38. Brandt R, Park M, Wroblewski K, Quinn L, Tasali E, Cinar A. Sleep quality and glycaemic variability in a real-life setting in adults with type 1 diabetes. Diabetologia (2021) 64(10):2159–69. doi: 10.1007/s00125-021-05500-9
39. Larcher S, Gauchez AS, Lablanche S, Pépin JL, Benhamou PY, Borel AL. Impact of sleep behavior on glycemic control in type 1 diabetes: the role of social jetlag. Eur J Endocrinol (2016) 175(5):411. doi: 10.1530/EJE-16-0188
40. Pillar G, Schuscheim G, Weiss R, Malhotra A, McCowen KC, Shlitner A, et al. Interactions between hypoglycemia and sleep architecture in children with type 1 diabetes mellitus. J Pediatr (2003) 142(2):163–8. doi: 10.1067/mpd.2003.66
41. Tsuneki H, Sasaoka T, Sakurai T. Sleep control, GPCRs, and glucose metabolism. Trends Endo-crinol Metab (2016) 27(9):633–42. doi: 10.1016/j.tem.2016.06.011
42. Donga E, van Dijk M, van Dijk JG, Biermasz NR, Lammers GJ, van Kralingen K, et al. Partial sleep restriction decreases insulin sensitivity in type 1 diabetes. Diabetes Care (2010) 33(7):1573–7. doi: 10.2337/dc09-2317
43. McDonough RJ, Clements MA, DeLurgio SA, Patton SR. Sleep duration and its impact on adherence in adolescents with type 1 diabetes mellitus. Pediatr Diabetes (2017) 18(4):262–70. doi: 10.1111/pedi.12381
Keywords: sleep structure, glycemic control, clustering techniques, glucose behavior prediction, statistical analysis
Citation: Botella-Serrano M, Velasco JM, Sánchez-Sánchez A, Garnica O and Hidalgo JI (2023) Evaluating the influence of sleep quality and quantity on glycemic control in adults with type 1 diabetes. Front. Endocrinol. 14:998881. doi: 10.3389/fendo.2023.998881
Received: 20 July 2022; Accepted: 19 January 2023;
Published: 22 February 2023.
Edited by:
Peng Li, University of Michigan, United StatesReviewed by:
Eung-Kwon Pae, University of Maryland, Baltimore, United StatesAli Cinar, Illinois Institute of Technology, United States
Copyright © 2023 Botella-Serrano, Velasco, Sánchez-Sánchez, Garnica and Hidalgo. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Marta Botella-Serrano, bWFydGEuYm90ZWxsYUBzYWx1ZC5tYWRyaWQub3Jn; Jose Manuel Velasco, bXZlbGFzY2NAdWNtLmVz; J. Ignacio Hidalgo, aGlkYWxnb0B1Y20uZXM=