Keeping track of the foods you eat and when you have migraines can help you find potential food triggers. Avoid foods that trigger migraines. If you suspect that a certain food is triggering migraines, remove it from your diet to see what happens. These foods may include aged cheese, chocolate, caffeine and alcohol.