This pilot, randomized controlled trial analyzed the effects of a cognitive behavioral therapy (CBT, n = 20) for insomnia vs a sleep hygiene (SH, n = 20) program on the three attentional networks (alertness, orienting, and executive function) and other additional outcome measures (sleep, pain, depression, anxiety, and daily functioning) of fibromyalgia patients. The CBT group showed significant improvement in alertness (F(1, 28) = 11.84, p = .0018), executive functioning (F(1, 28) = 15.76, p = .00059), sleep quality ( F(1, 38) = 6.33, p = .016), and a trend to improvement in daily functioning (p > .06), as compared with the SH group. The improvement in executive functioning was significantly related to the changes in sleep (r = 0.40, p = .026). A CBT for insomnia represents a useful intervention in fibromyalgia patients not only regarding sleep disturbance but also attentional dysfunction and probably daily functioning.