If you are susceptible to migraines then anything can set one off. TMD is a major contributor, and can require surgery at worst and a splint at best. Watching what you eat is important, and how you move your jaw... not just when eating but other times. (Don't cradle the phone on your shoulder, keep your tongue at the top back of your mouth with teeth slightly apart,etc.) Hormones are often a problem, making the issue worse. There are certain foods that do make it worse in themselves, and not just because you shouldn't have tried to chew them!
Since you said you had pain in the neck also, I'm thinking you also have stress headaches. So you might be fighting two different things! Personally I find that imitrex worked ok, but I really like the Zomig disintegrating tablets.. work fast! The faster you treat a migraine, as you probably know, the easier it might be to handle. I also use the Zomig nasal spray when I wake up in the night already with a migraine!
But have you tried ginger? In any form you can get it or want it.... it helps.
Cool, dark, quiet ahhhhhh I have some that are: lie on the side of the bed facing outward with a bucket on the floor.. knowing full well I will barf and when I do, the brains will explode.
Feel better.