Introduction

Sleep, as an indispensable resting state in the human physiological cycle, is characterized by periodicity and reversibility, playing a crucial role in maintaining homeostasis. However, approximately 10% of the general population worldwide suffers from insomnia disorder, which has been recognized as the most common clinical sleep disorder1. Notably, insomnia is not only an independent psychopathological phenomenon but also exhibits a bidirectional association with psychiatric disorders such as major depressive disorder, anxiety disorders, and substance use disorders. Additionally, it significantly increases the risk of developing somatic diseases, including hypertension and diabetes. From a public health perspective, insomnia has evolved into a significant socioeconomic issue by reducing work productivity, impairing quality of life, and increasing the burden on healthcare systems2,3,4. Given the high prevalence and widespread adverse effects of insomnia, there is an urgent need to develop accessible, effective, and user-friendly interventions to improve sleep quality for the large population affected by insomnia.

For the clinical management of insomnia, current international guidelines recommend a comprehensive intervention strategy that combines Cognitive Behavioral Therapy for Insomnia (CBT-I) with pharmacological treatment1,5,6. Among them, benzodiazepines and Z-drugs are widely used due to their rapid symptom relief7,8. However, long-term use may lead to adverse effects such as excessive sedation, cognitive impairment, and drug dependence8. In contrast, CBT-I, recognized as the “gold standard” of non-pharmacological interventions, not only demonstrates short-term efficacy comparable to that of medications but is also recommended as a first-line treatment by both the American Academy of Sleep Medicine (AASM)9 and the American College of Physicians (ACP)10 due to its long-lasting therapeutic effects and favorable safety profile11,12. Notably, the therapeutic benefits of CBT-I extend beyond sleep improvement, demonstrating significant synergistic effects in comorbid psychiatric disorders such as depression13, bipolar disorder14, post-traumatic stress disorder (PTSD)15, and generalized anxiety disorder (GAD)16.

The traditional implementation model of CBT-I has significant limitations. Although individualized outpatient treatment lasting 6–8 weeks is effective, its accessibility is substantially lower than that of pharmacotherapy due to the scarcity of trained therapists and high treatment costs17,18,19,20. The advancement of digital technology has provided a novel solution to overcome this limitation. Internet-based self-help programs, mobile applications, and hybrid models integrate core components such as sleep monitoring, psychoeducation, and behavioral training21, successfully extending the treatment setting from the clinic to daily life. In particular, smartphone-based CBT-I interventions facilitate a fully digitalized “screening-assessment-intervention-feedback” platform, granting patients greater autonomy in treatment while significantly reducing healthcare costs and improving service efficiency. This technology-enhanced intervention model is effectively bridging the accessibility gap between traditional CBT-I and pharmacotherapy17,22,23.

Although existing studies have systematically evaluated the clinical efficacy of CBT-I, two critical scientific gaps remain. First, most studies focus solely on endpoint efficacy measures (e.g., changes in Pittsburgh Sleep Quality Index (PSQI) scores) and lack an analysis of the temporal treatment response. For instance, while multiple studies have confirmed that CBT-I is equivalent to pharmacotherapy in short-term (4–6 weeks) sleep improvement24 and that combined treatment produces synergistic effects25, the predictive factors for individualized treatment response (e.g., baseline psychological profiles and personality traits) and their underlying mechanisms related to response onset remain unclear. Second, although emerging research has identified baseline predictors of CBT-I outcomes—such as pre-treatment sleep efficiency26 and maladaptive cognitive patterns27—the systematic identification of time-stratified predictors (e.g., early-response [≤ 8 weeks] vs. late-response [> 8 weeks]) remains limited, particularly regarding how baseline psychological profiles and personality traits interact with temporal treatment outcomes. This knowledge gap directly contributes to clinical decision-making challenges, as clinicians are unable to predict the optimal treatment outcome and expected response onset based on individual patient characteristics.

Real-world studies play a pivotal role in advancing our understanding of treatment efficacy and patient outcomes beyond controlled clinical trials. Unlike traditional randomized controlled trials (RCTs), which often have strict inclusion and exclusion criteria, real-world studies encompass diverse patient populations and clinical settings, providing a more comprehensive and generalizable perspective on treatment effectiveness. Our study leverages large-scale real-world data to investigate the heterogeneity of insomnia treatment response subtypes based on temporal dimensions and to identify key predictors of treatment efficacy and response time. This approach aims to bridge the gap between clinical research and practice, providing clinicians with actionable predictive insights to optimize personalized insomnia management and enhance patient prognoses.

Materials and methods

Participants

This retrospective study examined insomnia patients who visited the Sleep Disorders Clinic of Hangzhou Seventh People’s Hospital between January 1, 2016, and October 19, 2024. These patients underwent digital CBT-I therapy via the “Good Sleep 365” platform, which included sleep restriction, stimulus control, relaxation training, and cognitive restructuring.

The “Good Sleep 365” platform is a well-established mobile application specifically designed for insomnia patients. It integrates CBT-I training along with various assessment tools, including sleep diaries, the PSQI, the 7-item Generalized Anxiety Disorder Scale (GAD-7), the 9-item Patient Health Questionnaire (PHQ-9), the 15-item Somatic Symptom Scale (PHQ-15), and the Epworth Sleepiness Scale (ESS). The platform leverages the extensive reach and accessibility of digital technology to enhance long-term treatment adherence and optimize personalized insomnia management. Our previous studies have verified the efficacy of this application on digital Cognitive Behavioral Therapy for Insomnia (dCBT-I)28.

Inclusion and exclusion criteria

Inclusion criteria: (1) Diagnosis of insomnia disorder according to DSM-5 criteria; (2) Baseline PSQI score > 9, indicating moderate to severe insomnia; (3) Participation in dCBT-I combined with hypnotic medication, with hypnotics taken as needed according to guidelines (non-mandatory uniform medication). A total of 1,648 patients had a baseline PSQI score > 9, indicating moderate to severe insomnia. These patients received dCBT-I combined with pharmacotherapy and were followed up at least once. Among them, 834 patients completed the full set of assessments, including demographic questionnaires, PSQI, GAD-7, PHQ-9, PHQ-15, and ESS scales. The reduction rate in total PSQI scores was used as the primary indicator of treatment efficacy, with a reduction rate exceeding 25% generally considered indicative of effective treatment. 6–8 weeks is the widely recognized window period for evaluating CBT-I efficacy, and 76% of CBT-I studies use 6–8 weeks as the main research window period13. Therefore, based on the time dimension, patients were divided into two groups according to the efficacy: the early-response group (≤ 8 weeks) and the late-response group (> 8 weeks or non-responsive). Given the large sample size and extended follow-up period, patients underwent multiple assessments, exhibiting varying degrees of treatment response. Therefore, the average reduction rate in PSQI scores was ultimately used to determine treatment efficacy within the observed timeframe.

Exclusion criteria: (1) Severe physical illnesses; (2) Alcohol or substance abuse or dependence; (3) Pregnancy or breastfeeding.

Study design

All participants completed a general information questionnaire, baseline PSQI, GAD-7, PHQ-9, PHQ-15, and ESS assessments via the “Good Sleep 365” app. Subsequently, self-assessment questionnaires were administered biweekly. Participants completed the questionnaires and underwent digital CBT through the “Good Sleep 365” platform, which included sleep restriction, stimulus control, cognitive restructuring, sleep hygiene education, and relaxation training. Additionally, the app provided educational content on insomnia, including its consequences, treatment options, and strategies for preventing relapse. This information was presented to patients in video or audio formats for viewing. The platform continuously provides new information while allowing patients to revisit previously presented content. Eysenck Personality Questionnaire (EPQ) data were obtained from the integrated clinical research platform of Hangzhou Seventh People’s Hospital.

Assessment tools

The general information questionnaire collected data on patients’ gender, age, educational level, duration of insomnia, and family history of insomnia.

Pittsburgh Sleep Quality Index (PSQI): The PSQI is a self-reported scale consisting of 19 items, with a total score of 21. A score of 5 or higher indicates poor sleep quality29. PSQI scores can also be used for insomnia classification: 0–4 indicates no insomnia; 5–9 indicates mild insomnia; 10–14 indicates moderate insomnia; and 15–21 indicates severe insomnia30,31.

7-item Generalized Anxiety Disorder Scale (GAD-7): The GAD-7 assesses the severity of anxiety32. It consists of seven items, with a total score of 21, and is used to classify anxiety severity.

9-item Patient Health Questionnaire (PHQ-9): The PHQ-9 consists of nine items and primarily assesses depressive symptoms33, with a total score of 21. Higher PHQ-9 scores indicate more severe depressive symptoms.

15-item Somatic Symptom Scale (PHQ-15): Primarily assesses the severity of somatic symptoms34. Scores are classified as follows: 0–4 indicates no somatic symptom disorder; 5–9 indicates mild somatic symptom disorder; 10–14 indicates moderate somatic symptom disorder; and 15–21 indicates severe somatic symptom disorder.

Epworth Sleepiness Scale (ESS): Used to assess daytime sleepiness35. Scores are classified as follows: 0–9 indicates normal sleepiness; 10–12 indicates mild sleepiness; 13–15 indicates moderate sleepiness; and ≥ 16 indicates severe sleepiness.

Eysenck Personality Questionnaire (EPQ): Used to assess personality traits across several key dimensions36. It consists of four subscales: Extraversion versus Introversion (E), Lie (L), Neuroticism (N), and Psychoticism (P).

Statistical analysis

Demographic data and scale scores were presented as mean (standard deviation) for continuous variables and as number (percentage) for categorical variables. Baseline differences between the two groups were assessed using independent sample tests. The t-test was used for continuous variables, while the chi-square test was used for categorical variables. The variance inflation factors (VIFs) values for PHQ-9, PHQ-15, GAD-7, and ESS are 2.959, 1.885, 2.387, and 1.266, respectively. The mean VIF across all variables is 1.300. These results suggest that some variables show moderate levels of multicollinearity (Table 1). To ensure the robustness of subsequent model building, we employed a multivariable logistic regression analysis strategy using “demographic variables plus single psychological scale” as independent variables. This approach fundamentally eliminates sources of collinearity across scale dimensions and avoids multicollinearity issues arising from potential conceptual overlap. This allows for more precise identification of potential risk factors associated with poor or delayed treatment response in insomnia patients. Previous studies have also affirmed this analytical approach33,37,38. Adjusted odds ratios (ORs) and 95% confidence intervals (CIs) were calculated. All statistical analyses were conducted using IBM SPSS Statistics (version 29.0). All reported P-values were two-tailed, with statistical significance set at 0.05.

Table 1 VIF test results.

Ethical approval

Due to the retrospective nature of the study, the Ethics Committee of the Institutional Review Board of Hangzhou Seventh People’s Hospital (Approval Number: 2025-010-01) waived the need for obtaining informed consent. The experimental protocol was approved by the Ethics Committee of the Institutional Review Board of Hangzhou Seventh People’s Hospital, and all methods and procedures were performed in accordance with relevant guidelines and regulations.

Results

This is a real-world big data study. From January 1, 2016, to October 19, 2024, a total of 834 complete responses meeting the inclusion criteria were collected. Based on the temporal dimension, the 834 patients were categorized into two groups: the early-response group (≤ 8 weeks, n = 525) and the late-response group (> 8 weeks or non-responsive, n = 309). EPQ data were collected from 194 patients who completed the personality assessment in these groups. Based on the temporal dimension, they were categorized into two groups: the early-response group (n = 117) and the late-response group (n = 77).

Demographic characteristics

The demographic characteristics of the two groups are presented in Table 2. No significant difference was observed in gender distribution between the two groups (P = 0.491). However, the percentage of males was higher in the late-response group (28.5%) than in the early-response group (26.3%). There was no significant difference in the family history of insomnia between the two groups (P = 0.167). However, significant differences were observed between the two groups in terms of age (P = 0.005), duration of disorder (P < 0.001) and educational level (P < 0.001). Specifically, the late-response group had a higher mean age than the early-response group. The percentage of patients in the late-response group with a 5–10 year insomnia course was significantly higher than that in the early-response group, suggesting that patients in the late-response group were more inclined to have a longer insomnia course. The proportion of patients with a college degree or higher was greater in the early-response group than in the late-response group, suggesting a higher educational level in the early-response group.

Table 2 Demographic characteristics of participants [Mean ± Standard Deviation (SD), Median (Interquartile Range, IQR)].

Baseline data comparison

The GAD-7 scores for the early-response and late-response groups were 4.380 ± 4.650 and 3.710 ± 4.080, respectively. A significant difference in GAD-7 scores was observed between the groups (P = 0.031), with the early-response group having a higher GAD-7 score than the late-response group. The PHQ-15 scores of the groups were 6.280 ± 4.580, 5.710 ± 4.480, respectively. There was no significant difference in PHQ-15 scores between the groups (P = 0.078). The ESS scores of the groups were 3.170 ± 3.790, 3.150 ± 3.740, respectively. There was no significant difference in ESS scores between the groups (P = 0.949). The PHQ-9 scores for the early-response and late-response groups were 5.28 ± 4.72 and 4.62 ± 4.34, respectively. A significant difference in PHQ-9 scores was observed between the groups (P = 0.044), with the early-response group exhibiting a higher PHQ-9 score than the late-response group. The EPQ scale comprises four dimensions: extraversion versus introversion, lie, neuroticism, and psychoticism. The neuroticism dimension scores for the early-response and late-response groups were 55.82 ± 11.14 and 52.48 ± 10.65, respectively. A significant difference in neuroticism scores was observed between the groups (P = 0.039), with the early-response group scoring higher than the late-response group. The extraversion dimension scores of the EPQ were 50.81 ± 9.94, 52.57 ± 8.50, respectively, with no significant difference between the groups (P = 0.189). The lie dimension scores of the EPQ were 42.52 ± 8.90, 42.81 ± 6.95, respectively, with no significant difference between the groups (P = 0.809). The psychoticism dimension scores of the EPQ were 50.32 ± 11.54, 49.87 ± 11.31, respectively, with no significant difference between the groups (P = 0.791; Tables 3 and 4).

Table 3 Baseline scores of the two groups [Mean ± Standard Deviation (SD)].
Table 4 Baseline EPQ dimension scores of the two groups [Mean ± Standard Deviation (SD)].

Factors associated with insomnia treatment outcomes and response time

Multivariable logistic regression analysis indicated that higher educational level (college or above), higher PHQ-9 and PHQ-15 scores, and neuroticism personality traits were significant predictors of better treatment response and earlier onset of efficacy in insomnia patients. A longer duration of insomnia was identified as a risk factor for poor treatment response and delayed onset of efficacy (Tables 5, 6. 7, 8 and 9).

Table 5 Risk factors influencing insomnia treatment efficacy and response time based on multivariable logistic regression analysis.
Table 6 Risk factors influencing insomnia treatment efficacy and response time based on multivariable logistic regression analysis.
Table 7 Risk factors influencing insomnia treatment efficacy and response time based on multivariable logistic regression analysis.
Table 8 Risk factors influencing insomnia treatment efficacy and response time based on multivariable logistic regression analysis.
Table 9 Risk factors influencing insomnia treatment efficacy and response time based on multivariable logistic regression analysis.

Discussion

This study represents the most extensive real-world investigation conducted in a single clinical setting to evaluate the efficacy of dCBT-I delivered via a mobile application for insomnia patients. Although multiple factors influence insomnia treatment outcomes, this study primarily focuses on identifying specific patient characteristics that can predict treatment efficacy and response time.

Our study focused on 834 fully documented patients who met the inclusion criteria. These patients were categorized into two groups based on treatment response: early-response group (≤ 8 weeks) and late-response group (> 8 weeks or non-responsive). Demographic and baseline scale data revealed significant differences between the two groups in terms of age, educational level, duration of insomnia, GAD-7 score, PHQ-9 score, and personality traits. The late-response group had a higher mean age and longer duration of insomnia than the early-response group. Conversely, the early-response group exhibited higher educational levels, GAD-7 scores, PHQ-9 scores, and neuroticism personality trait scores compared to the late-response group.

Multivariable logistic regression analysis indicated that higher educational level (college or above), higher PHQ-9 and PHQ-15 scores, and neuroticism personality traits were significant predictors of better treatment outcomes and earlier response to treatment in insomnia patients. A longer duration of insomnia was identified as a risk factor for poorer treatment outcomes and delayed response to treatment. Specifically, higher educational attainment (college or above) was associated with better treatment outcomes and an earlier response to treatment. Insomnia patients with a college degree or higher were 56.6–58.1 times more likely to experience better treatment outcomes and an earlier response compared to those with only primary education, aligns with Forsell et al.26. This parallel suggests that patients with higher educational attainment are more likely to understand and adhere to digital CBT-I interventions39. Moreover, previous studies have suggested that higher educational levels serve as a protective factor for mental health, as individuals with greater education tend to be more resilient to negative life events and better at avoiding maladaptive behaviors40. Multivariable logistic regression indicated that a longer duration of insomnia was associated with poorer treatment outcomes and delayed response to treatment. Specifically, patients with an insomnia duration of > 5 years were 2.5–2.6 times more likely to have poorer treatment outcomes and a delayed response compared to those with an insomnia duration of less than one month. A longer duration of insomnia (> 5 years) was identified as a risk factor for poorer treatment efficacy and delayed response. This finding underscores the critical importance of early intervention in insomnia management. While the exact mechanisms underlying this association warrant further investigation, our study supports the hypothesis that patients with long-term insomnia may develop entrenched maladaptive sleep habits, which can complicate behavioral interventions and prolong the treatment process. Additionally, chronic insomnia can induce a self-reinforcing psychological effect, where persistent sleep difficulties lead to a fear of sleep and reduced confidence in treatment, potentially exacerbating treatment resistance41,42. These insights highlight the need for timely therapeutic strategies to prevent the escalation of insomnia into a more treatment-resistant chronic condition.

Multivariable logistic regression analysis demonstrated that higher PHQ-9 scores were associated with better treatment outcomes and an earlier response to treatment. Specifically, for each one-point increase in baseline PHQ-9 score, the likelihood of achieving better treatment outcomes and an earlier response increased by 3.3%. Thus, a higher PHQ-9 score may serve as a predictive factor for improved insomnia treatment efficacy and response time. Linares et al. also highlighted cognitive and psychological factors as significant predictors27. Previous studies have demonstrated a bidirectional relationship between the severity of insomnia and depression. Furthermore, during CBT-I, the severity of insomnia has been shown to exert a greater influence on depression than vice versa43, highlighting the necessity of prioritizing insomnia treatment. Some hypotheses suggest that the association between insomnia and depressive symptoms may be mediated by dysfunctional emotion regulation mechanisms. Patients with insomnia often experience heightened negative emotions and exhibit exaggerated emotional responses. As insomnia symptoms improve, patients may experience milder and more transient negative emotions, which in turn become more amenable to functional regulation43,44. Therefore, we hypothesize that the improvement of insomnia symptoms during treatment may lead to a reduction in negative emotions, making these emotions more manageable. This process may facilitate an earlier therapeutic response in patients.

Additionally, multivariable logistic regression analysis indicated that higher PHQ-15 scores were associated with better treatment outcomes and earlier response to treatment. Specifically, for each one-point increase in baseline PHQ-15 score, the likelihood of achieving better treatment outcomes and an earlier response increased by 3.3%. This suggests that a higher PHQ-15 score may serve as a predictive factor for insomnia treatment efficacy and response time. Multiple studies on sleep deprivation have demonstrated that sleep loss in healthy individuals leads to hyperalgesia (increased pain sensitivity)45,46,47. A recent study found that sleep continuity disruption in healthy individuals weakens psychophysical markers of endogenous pain inhibition47. Conversely, the alleviation of somatic symptoms appears to be achievable through targeted insomnia treatment. Upon initiating treatment, patients who benefit from CBT-I may develop healthier pain-coping behaviors, incorporating them as a strategy for pain management. As patients’ sleep continuity improves, their pain perception may diminish. The hyperalgesia induced by sleep disruption is likely to normalize rapidly once sleep is restored, potentially contributing to an early therapeutic response to insomnia treatment. Our multivariable logistic regression analysis indicated that neuroticism personality traits may serve as a predictor of better treatment efficacy and earlier response to insomnia treatment, which appears counterintuitive. Previous studies have suggested that neuroticism is an unstable emotional trait that is highly susceptible to external stressors. Individuals with high neuroticism may exhibit heightened emotional and cognitive arousal, leading to excessive rumination and anxiety about sleep. This persistent cognitive pattern may, in turn, exacerbate insomnia symptoms48. Neuroticism personality traits were found to be associated with better treatment efficacy and earlier response to insomnia treatment, one possible explanation is that individuals with high neuroticism may particularly benefit from the cognitive restructuring component of CBT-I. Through repeated therapeutic reinforcement, they may experience a reduction in maladaptive thoughts about sleep, thereby mitigating rumination and sleep-related anxiety. Consequently, these individuals may achieve a favorable response to insomnia treatment within a shorter time frame.

By analyzing treatment response patterns across different time frames in insomnia patients, healthcare professionals can develop more personalized therapeutic strategies tailored to individual patient characteristics. For patients with a delayed response to treatment, clinicians can help set realistic expectations, maintain regular communication, and encourage adherence to therapy to enhance their confidence in the treatment process. For patients with an early treatment response, interventions can be intensified at appropriate stages to reinforce short-term efficacy and prevent symptom relapse. Additionally, premature discontinuation or reduction of treatment frequency should be avoided to ensure sustained therapeutic benefits. Regular follow-ups and assessments are equally important to monitor potential relapse risks and adjust treatment strategies accordingly. Overall, this study provides novel insights into the classification of insomnia treatment efficacy based on temporal dimensions, highlighting the influence of demographic factors, anxiety, depression, somatic symptoms, and personality traits on treatment outcomes and response time. These findings may serve as a valuable reference for clinicians in developing more precise, individualized treatment strategies and optimizing therapeutic processes to enhance overall treatment outcomes for insomnia patients.

Limitations

Despite several strengths, including a sufficient sample size from a specialized sleep disorder clinic, high patient adherence and follow-up rates, and a fully digital, non-invasive intervention with minimal attrition, several important limitations must be considered.

First, while the Insomnia Severity Index (ISI) is recognized as a more suitable measure for evaluating treatment effects compared to the PSQI (which primarily assesses general sleep quality), the clinical cohort analyzed in this study was established prior to the widespread incorporation of ISI into our assessment system. This resulted in systematic unavailability of ISI data, potentially limiting insights into factors influencing insomnia severity and differential treatment efficacy. Furthermore, future studies should strive for the global standardization of PSQI classification thresholds to enhance the cross-cultural comparability of research findings.

Second, this study employed a retrospective, non-controlled design, which inherently limits causal inference. The absence of a randomized control group introduces potential confounding factors that may influence the results. Future RCTs are necessary to validate the findings of this study.

Third, the gender distribution of the study sample was skewed, with 73% of participants being female. This imbalance may limit the generalizability of the findings across different gender groups. Therefore, future research should address gender differences by including a more balanced sample with a higher proportion of male participants to enhance the external validity of the findings.

Fourth, a significant limitation of this study is the lack of systematic monitoring of medication use during the treatment period. This gap restricts our ability to fully disentangle the independent effects of CBT-I from those of pharmacological interventions, which could influence treatment outcomes. Future research should incorporate comprehensive assessments of medication use to better understand its interaction with CBT-I and its impact on patient recovery.

Fifth, this study relied on smartphone-based delivery of CBT-I, which partially overcomes geographical barriers and improves intervention accessibility. However, further research is needed to explore various factors influencing treatment efficacy in insomnia patients. Future studies should refine research designs to enhance methodological rigor. For instance, the inclusion of a placebo control group could help mitigate potential placebo effects. Additionally, refining the temporal framework would allow for a more precise evaluation of response onset in different patients. Further stratification of study populations based on demographic characteristics may help identify key factors influencing treatment efficacy. These methodological refinements would facilitate a deeper understanding of factors influencing insomnia treatment efficacy and response time, ultimately optimizing insomnia management strategies and enhancing clinical applicability.

Conclusion

Although multiple factors influence treatment efficacy and response time in insomnia patients, certain specific characteristics exhibit significant predictive value. Our findings indicate that insomnia patients with higher educational attainment (college or above), higher PHQ-9 and PHQ-15 scores, and neuroticism personality traits tend to experience better treatment outcomes and an earlier response to treatment. In contrast, longer duration of insomnia, tend to experience poorer treatment outcomes and a delayed response to treatment.