I believe there are many different causes of migraine, or at least triggers.
I used to suffer fairly badly at times from them. After spinal x-rays after a back injury, a previous injury from decades before had created problems in my neck. I remembered the event but never associated problems with it. I had bone growth coming of the back of a few upper vertebra from the injury.
Basic chiropractic adjustments and learning to recognize the signs of a possible migraine coming, along with some simple neck stretches, has completely eliminated them for me.
Those sound more like tension headaches, which can be as severe, but are not the same. Quite often they are caused by muscles in your neck that surround a nerve cluster that wraps up around your head and down to your eyes. The muscles tense up and won't release, putting pressure on the nerve.
I suffered these for years. A bad one was debilitating. I went to see another doctor in my doc's practice (he was off that day) to get an Rx for some migraine medicine. She mentioned in passing that they might be tension headaches and that those are often caused by neck issues.
Now I knew already that I had neck issues due to some past trauma. So I went and saw a physical therapist. Since then, I learned the stretches like you mentioned, plus exercises to strengthen the muscles, and how to do trigger point massage to get the muscles to release. With those three techniques, I have reduced the frequency of the headaches by 90%, and when I do feel one ramping up, I can usually nip it in the bud. The exercises have really helped because even if I sleep in a bad position, I usually don't get the bad headache - before, it was almost certain I would.
But I have to do the neck exercises and stretches every day. Not just for this issue, but to correct postural problems as well.