Almonds which contain magnesium that helps in relaxing blood vessels. Some experts say that diets rich in magnesium can treat or prevent migraine attacks. Now almond milk, almond butters are available in the market. When hunger strikes you, put a hand full of almonds into your mouth to keep the hunger aside. Because hunger can also cause migraine. You can also include magnesium rich foods like bananas, dried apricots, avocados, cashews, brown rice, legumes etc.