Subjects suffering insomnia got more wrong answers in a face-matching task—but they were paradoxically more confident of their responses. Christopher Intagliata reports.