BackgroundComorbid sleep disturbances are common among individuals with chronic pain, and Cognitive Behavioural Therapy for Insomnia (CBT-i) has proven effective for such individuals. Nonetheless, research on web-based CBT-i tailored for patients with both chronic pain and insomnia is limited. This study aimed to evaluate the feasibility and efficacy of internet-based CBT-i and to explore potential mechanisms underlying treatment outcomes. MethodsIn this study, 85 participants suffering from comorbid insomnia and chronic pain were randomized into two groups: Internet-based CBT for Insomnia (ICBT-i) and Internet-based Applied Relaxation (IAR). Both interventions spanned eight weeks, supported by therapeutic guidance throughout. ResultsParticipation was modest, with an average module completion of 2.0 out of 8 for ICBT-i and 2.4 for IAR. Both interventions significantly alleviated insomnia symptoms post-treatment without notable differences between them. Directly after treatment, IAR outperformed ICBT-i in reducing pain interference, anxiety, and in enhancing self-rated health, though these differences lessened at the 6-month follow-up. Potential therapeutic mechanisms may involve attenuating maladaptive sleep beliefs and augmenting sleep-related willingness. ConclusionsThe study encountered low engagement rates, with approximately one-third of participants not completing any module. The limited efficacy of ICBT-i may be due to low treatment involvement, with few patients completing key techniques like sleep compression and stimulus control. Despite the low adherence, both interventions yielded post-treatment improvements in insomnia symptoms, but to establish internet-based treatments for insomnia as a viable option in chronic pain management, patient engagement must be improved.