Sixty patients were enrolled in this study at the Second Hospital of Hebei Medical University, Shijiazhuang, China. The inclusion criteria were as follows: (1) age 18–65 years, (2) right‐handed, (3) meeting the diagnostic criteria for ID in the DSM‐V, (4) a total score of ≥5 on the Pittsburgh Sleep Quality Index (PSQI) at screening, a total score of ≥8 on the insomnia severity index (ISI) at screening, and (5) signed informed consent. The exclusion criteria were as follows: (1) other comorbid mental disorders, (2) serious neurological or medical diseases, (3) other sleep disorders, (4) frequent jet lag, (5) Epworth Sleepiness Scale (ESS) score > 11, (6) Beck Depression Index (BDI) score > 20 or Beck Anxiety Index (BAI) score > 45, (7) pregnancy, lactation, or plans to become pregnant during the study period, (8) structural brain abnormalities based on magnetic resonance imaging (MRI), and (9) use of psychiatric medication, hypnotics, or having been treated with CBT‐I in the last 2 weeks.