Good physical fitness can prevent migraine attacks. Endurance exercise such as swimming, cycling, or jogging keeps you fit. Overexertion from sports with a competitive element can however lead to migraine attacks for some people.
Since migraine headaches can intensify through light routine exercise and movements (such as bending down or walking), many avoid movement sometimes even when the headache has long passed. Daily physical activity should be slowly increased again after a migraine attack through a variety of habits and rituals, such as always taking the stairs or getting up from the desk and walking around once an hour.
Tension headaches do not usually intensify through physical activity. Sometimes movement even has a positive effect in the early stages of a tension headache. Just as with migraines, regular endurance training can reduce the occurrence of tension headaches.