Examine whether cognitive behavioral therapy for insomnia (CBT-I) improves sleep in posttraumatic stress disorder (PTSD) as well as nightmares, nonsleep PTSD symptoms, depression symptoms, and psychosocial functioning. RANDOMIZED CONTROLLED TRIAL WITH TWO ARMS: CBT-I and monitor-only waitlist control. Department of Veterans Affairs (VA) Medical Center. Forty-five adults (31 females: [mean age 37 y (22-59 y)] with PTSD meeting research diagnostic criteria for insomnia, randomly assigned to CBT-I (n = 29; 22 females) or monitor-only waitlist control (n = 16; nine females). Eight-session weekly individual CBT-I delivered by a licensed clinical psychologist or a board-certified psychiatrist. Measures included continuous monitoring of sleep with diary and actigraphy; prepolysomnography and postpolysomnography and Clinician-Administered PTSD Scale (CAPS); and pre, mid, and post self-report questionnaires, with follow-up of CBT-I participants 6 mo later. CBT-I was superior to the waitlist control condition in all sleep diary outcomes and in polysomnography-measured total sleep time. Compared to waitlist participants, CBT-I participants reported improved subjective sleep (41% full remission versus 0%), disruptive nocturnal behaviors (based on the Pittsburgh Sleep Quality Index-Addendum), and overall work and interpersonal functioning. These effects were maintained at 6-mo follow-up. Both CBT-I and waitlist control participants reported reductions in PTSD symptoms and CAPS-measured nightmares. Cognitive behavioral therapy for insomnia (CBT-I) improved sleep in individuals with posttraumatic stress disorder, with durable gains at 6 mo. Overall psychosocial functioning improved following CBT-I. The initial evidence regarding CBT-I and nightmares is promising but further research is needed. Results suggest that a comprehensive approach to treatment of posttraumatic stress disorder should include behavioral sleep medicine. TRIAL NAME: Cognitive Behavioral Treatment Of Insomnia In Posttraumatic Stress Disorder. URL: http://clinicaltrials.gov/ct2/show/NCT00881647. NCT00881647.