Insomnia and sleep problems are common in pregnancy and have potentially negative impacts on both parental and infant health. This study examined the sleeping for two adaptation of cognitive behavioral therapy for insomnia (CBT-I) in pregnancy. A parallel (1:1) randomized controlled trial evaluated CBT-I (n=32) compared to a treatment as usual (TAU) waitlist (n=32) among pregnant individuals from Alberta, Canada experiencing insomnia. Five weekly individual sessions of CBT-I pivoted from in-person delivery to telehealth due to COVID-19 pandemic physical distancing regulations. Insomnia symptom severity (primary outcome), insomnia diagnosis by structured interview, self-reported sleep problems, as well as sleep parameters measured by diary and actigraphy, were assessed pre-treatment at 12-28 weeks gestation (T1), one-week post-treatment (T2), and six months postpartum (T3). Birth information (secondary outcomes) were collected via delivery record and parent report of infant sleep (exploratory outcome) was taken at T3. Multilevel modeling using an intention-to-treat approach showed that CBT-I was associated with a decrease in insomnia symptoms and improved sleep quality across time compared to TAU. The CBT-I group had fewer diagnoses of insomnia post-treatment, but the difference did not reach statistical significance until 6-months postpartum. Participants with worse sleep quality at baseline benefitted substantially more from CBT-I vs. TAU waitlist. CBT-I delivered in pregnancy can reduce symptoms of insomnia and improve sleep quality, which could in turn minimize risk of negative consequences for birthing parent and infant health. Registry: ClinicalTrials.gov; Identifier: NCT03918057; Name: Sleeping for Two: RCT of CBT-Insomnia in Pregnancy; URL: https://www.clinicaltrials.gov/study/NCT03301727.