Background Optimism and pessimism are related to several mental health and brain disorders, are significant predictors of physical and psychological health outcomes, and implicated as psychosocial determinants of the pain experience. Despite this promising evidence, limited information is available on optimism and pessimism in headache disorders.

Objective To evaluate the influence of optimism and pessimism in meeting criteria for migraine and related disability in a population‐based sample.

Methods This is an observational, cross‐sectional study. The sample population was selected through a stratified, multi‐stage area probability sample of households, as used by the last Brazilian Census. A validated questionnaire eliciting data on demographics, headache features, migraine‐related disability, depression (PHQ‐9), anxiety (GAD‐7), optimism, and pessimism (life orientation test – revised) was administered to people with migraine and headache‐free control participants from the general population in São Paulo, Brazil via trained interviewers. Six hundred individuals were contacted. The odds for having migraine/no headache diagnosis were calculated by binary logistic regression, and ordinal regression was performed to check associations between migraine‐related disability and optimism.

Results A total of 302 individuals (mean ± SD age: 39.7 ± 12.7; BMI: 26.5 ± 5.9) met inclusion criteria and were included, 140 controls (with no history of headache disorders) and 162 people meeting criteria for migraine (29 with chronic migraine, that is, 15 or more headache days/month). People with migraine were less optimistic and more pessimistic than controls, and endorsed higher levels of anxious and depressive symptoms. Pessimism (OR 95% CI = 1.16 [1.05–1.28], P = .005) and anxiety (OR 95% CI = 1.19 [1.10–1.29], P < .001) were predictors of meeting criteria for migraine, while optimism (β 95% CI = −0.915 [−1.643, −0.188], P = .01) was inversely associated with migraine‐related disability.