If you don’t already know this… many studies have now proven that regular exercise has the potential to reduce the frequency and intensity of your headaches and migraines. When you exercise, your body releases endorphins, which are the body’s natural painkillers.
"A recent study conducted by Varkey, Cider, Carlsson, and Lindy (2011) found that exercise, regular relaxation exercises, or the use of topiramate were equally effective in reducing the rate of migraines. Those participants in the exercise group exercised for 40 minutes three times a week. Therefore, exercise can be an effective intervention in the preventive treatment of migraines." 
In fact, there have been a number of studies now (as recent as 2018) providing data towards the benefits of exercise for migraine prevention:
Here are some tips to help you plan your exercise for migraine prevention strategy and maintain it:
Before, during, and after exercise drink a glass of water... or 2!
The American Migraine Foundation says to "make sure that your mouth is not dry and that you sweat. If you are thirsty, that is a sign that you have a substantial fluid deficit and may trigger a migraine. If you do not sweat when you are exercising at a moderate to vigorous level, it is a sign of dehydration." 
The second part of your exercise plan will to be to get the right fuel into your body.
You can eat something sufficient about an hour and a half before you exercise. Exercise will cause your blood sugar level to decrease, and it’s really important to have a good source of energy. So - protein rich foods are best. A protein bar or nuts, are good snacks to have prior to exercise. If you find yourself getting cramps when you've eaten too soon prior to exercise, you’ll need to schedule your snacks / meals and exercise more carefully. "A regular schedule is always beneficial in headache and migraine management." 
You can eat twenty minutes or half an hour after your work out too if you feel shaky.
Make sure you warm-up with some stretches or slow paced walking. Don’t jump straight into sudden, vigorous exercise. For some of us, exercise can be a headache or migraine trigger. So, if speed walking is your exercise of choice, walk for five minutes at a slow pace for about two and a half to three miles per hour before speeding up your pace. Or if you’re doing weights, make sure to lift lighter weights before doing the more intense resistance training.
Start slow and light and build up. And then end slow and cool down.
It can be really hard to schedule in exercise time just for yourself. But if you get migraines, it might help to look at this as part of your migraine prevention strategy.
If you have children, some community centers have child minding rooms so you can exercise. Develop your assertiveness muscle by saying no to anything that conflicts with your exercise or activity schedule. A great habit to form is to make a log of your exercise regime and some kind of reward system. Although the reward may be fewer migraine attacks.
Make sure to keep a migraine diary at the same time, so you can see if you can reduce the attacks through regular exercise.
To have a well rounded routine it's best to cover these four types of exercise: endurance, strength, balance, and flexibility. These don't need to be done every day, but using a variety will help keep your body healthy and fit, and you interested and motivated.
Many types of exercises, like yoga for example, will improve balance, strength and flexibility.
Increase muscular strength:
Improve your endurance:
Increase flexibility and balance:
An added plus… is that exercise reduces stress and can help you to sleep better. Stress and inadequate sleep are two more migraine triggers.
If exercise seems to trigger an attack for you, discuss it with your doctor. You might need a daily preventive migraine medication or better strategy.
Exercise for Migraine Prevention Page Sources:
1. The American Migraine Foundation (2015) Effects of Exercise on Headaches and Migraines. Available [online] at: https://americanmigrainefoundation.org/resource-library/effects-of-exercise-on-headaches-and-migraines/
2. Lippi, G., Mattiuzzi, C., & Sanchis-Gomar, F. (2018). Physical exercise and migraine: for or against?. Annals of translational medicine, 6(10), 181. Available [online] at: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5994516/ Accessed Mar. 5, 2019