The aim of this study was to evaluate, using a prospective and a cross-sectional design, the relationship between level of physical activity and migraine and non-migraine headache. In the prospective part, 22,397 participants, not likely to have headache, answered questions about physical activity at baseline (1984-1986) and responded to a headache questionnaire at follow-up. In the cross-sectional part (1995-1997), 46,648 participants answered questions about headache and physical activity. Physically inactive individuals at baseline were more likely than active individuals to have non-migraine headache 11 years later (odds ratio 1.14, 95% confidence interval 1.02, 1.28). In the cross-sectional analyses, low physical activity was associated with higher prevalence of migraine and non-migraine headache. In both headache groups, there was a strong linear trend (P < 0.001) of higher prevalence of 'low physical activity' with increasing headache frequency. The result may indicate that physical inactivity among headache-free individuals is a risk factor for non-migraine headache and that individuals with headache are less physically active than those without headache.