The primary purpose of this study is to test whether and how cognitive-behavioral therapy for insomnia (CBTi), a well-supported and highly effective insomnia treatment, may directly improve Posttraumatic Stress Disorder (PTSD) and Major Depressive Disorder (MDD) symptoms. The study is designed as a randomized controlled trial (RCT) to test the effect of CBTi on symptoms of PTSD and co-morbid depression prior to an evidence-based PTSD intervention and to assess the role of neurobiological processes and sleep architecture in mediating treatment outcomes.