IMPORTANCE Digital cognitive behavioral therapy (dCBT) is a scalable and effective intervention for treating insomnia. Most people with insomnia, however, seek help because of the daytime consequences of poor sleep, which adversely affects quality of life. OBJECTIVES To investigate the effect of dCBT for insomnia on functional health, psychological well-being, and sleep-related quality of life and to determine whether a reduction in insomnia symptoms was a mediating factor. DESIGN, SETTING, AND PARTICIPANTS This online, 2-arm, parallel-group randomized trial comparing dCBT for insomnia with sleep hygiene education (SHE) evaluated 1711 participants with self-reported symptoms of insomnia. Participants were recruited between December 1, 2015, and December 1, 2016, and dCBT was delivered using web and/or mobile channels plus treatment as usual; SHE comprised a website and a downloadable booklet plus treatment as usual. Online assessments took place at 0 (baseline), 4 (midtreatment), 8 (posttreatment), and 24 (follow-up) weeks. Programs were completed within 12 weeks after inclusion. MAIN OUTCOMES AND MEASURES Primary outcomes were scores on self-reported measures of functional health (Patient-Reported Outcomes Measurement Information System: Global Health Scale; range, 10-50; higher scores indicate better health); psychological well-being (Warwick-Edinburgh Mental Well-being Scale; range, 14-70; higher scores indicate greater well-being); and sleep-related quality of life (Glasgow Sleep Impact Index; range, 1-100; higher scores indicate greater impairment). Secondary outcomes comprised mood, fatigue, sleepiness, cognitive failures, work productivity, and relationship satisfaction. Insomnia was assessed with the Sleep Condition Indicator (range: 0-32; higher scores indicate better sleep). RESULTS Of the 1711 participants included in the intention-to-treat analysis, 1329 (77.7%) were female, mean (SD) age was 48.0 (13.8) years, and 1558 (91.1%) were white. Use of dCBT was associated with a small improvement in functional health compared with SHE (adjusted difference [95% CI] at week 4, 0.90 [0.40-1.40]; week 8, 1.76 [1.24-2.28]; week 24, 1.76 [1.22-2.30]) and psychological well-being (adjusted difference [95% CI] at week 4, 1.04 [0.28-1.80]; week 8, 2.68 [1.89-3.47]; week 24, 2.95 [2.13-3.76]), and with a large improvement in sleep-related quality of life (at week 4, −8.76 [−11.83 to −5.69]; week 8,-17.60 [−20.81 to −14.39]; week 24, −18.72 [−22.04 to −15.41]) (all P < .01). A large improvement in insomnia mediated these outcomes (range mediated, 45.5%-84.0%). CONCLUSIONS AND RELEVANCE Use of dCBT is effective in improving functional health, psychological well-being, and sleep-related quality of life in people reporting insomnia symptoms. A reduction in insomnia symptoms mediates these improvements. These results confirm that dCBT improves both daytime and nighttime aspects of insomnia, strengthening existing recommendations of CBT as the treatment of choice for insomnia.