Inclusion Criteria:  Fulfills the DSM-5 diagnostic criteria for insomnia disorder: a) Difficulty initiating sleep, difficulty maintaining sleep, and early morning awakenings despite adequate opportunity for sleep (e.g., adequate time and circumstances for sleep and a safe, quiet, and dark bedroom). b) The sleep difficulties cause significant distress or impairment in social, occupational, educational, academic, behavioral, or other important areas of functioning. c) The sleep difficulties occur at least 3 nights per week and have been present for at least 3 months. d) The symptoms are not better explained by and do not occur exclusively during the course of another sleep-wake disorder. e) The symptoms cannot be attributed to the effects of a substance (e.g., drug abuse and medication). f) Coexisting mental disorders and medical conditions do not adequately explain the predominant complaint of insomnia.  Exclusion Criteria:  Severe psychiatric illness (e.g., severe depression, schizophrenia, bipolar disorder) Suicidal ideation Untreated sleep disorder other than insomnia (e.g., sleep apnea, and restless legs syndrome) Epilepsy Cognitive disorder Pregnancy Night shift work Language difficulties (inability to understand and speak Swedish well enough to participate in the intervention and respond to measurement instruments) ≤ 7 points on the Insomnia Severity Index