I like to distinguish a “cause “from a “trigger.“ We are far from understanding all of the causes of migraine, but likely most are genetically based and therefore something we inherit. What we inherit is a low threshold for the development of a migraine.
Some people with migraine have low levels of magnesium in their brains. Should this be the case, their brains become more “irritable” and a migraine attack is more easily triggered. Unfortunately, testing the blood for levels of magnesium is not helpful, since the blood levels do not reflect the amount of magnesium in the brain.
Therefore, it is often recommended to treat this deficiency, even if we are not certain that it is a problem. You cannot take large doses of magnesium and treat it quickly, or diarrhea will occur, as when you take milk of magnesia. Therefore you need to take low doses and it will make more than 3 months of treatment to determine whether this is useful in reducing the migraines.