Objective: To examine the mediators and the potential of treatment matching to improve outcome for cognitive behavior therapy (CBT) for insomnia. Method: Participants were 188 adults (117 women; Mage = 47.4 years, SD = 12.6) meeting the Diagnostic and Statistical Manual of Mental Disorders (4th ed.; text rev.; DSM–IV–TR; American Psychiatric Association [APA], 2000) diagnostic criteria for chronic insomnia (Mduration: 14.5 years, SD: 12.8). Participants were randomized to behavior therapy (BT; n = 63), cognitive therapy (CT; n = 65), or CBT (n = 60). The outcome measure was the Insomnia Severity Index (ISI). Hypothesized BT mediators were sleep-incompatible behaviors, bedtime variability (BTv), risetime variability (RTv) and time in bed (TIB). Hypothesized CT mediators were worry, unhelpful beliefs, and monitoring for sleep-related threat. Results: The behavioral processes mediated outcome for BT but not CT. The cognitive processes mediated outcome in both BT and CT. The subgroup scoring high on both behavioral and cognitive processes had a marginally significant better outcome if they received CBT relative to BT or CT. The subgroup scoring relatively high on behavioral but low on cognitive processes and received BT or CBT did not differ from those who received CT. The subgroup scoring relatively high on cognitive but low on behavioral processes and received CT or CBT did not differ from those who received BT. Conclusion: The behavioral mediators were specific to BT relative to CT. The cognitive mediators were significant for both BT and CT outcomes. Patients exhibiting high levels of both behavioral and cognitive processes achieve better outcome if they receive CBT relative to BT or CT alone.