"Dietary magnesium intake has steadily declined over the preceding century, due to...(b) making dietary choices low in magnesium-rich foods such as whole grains, rice and wheat bran, nuts, seeds, chocolate, peanuts, peanut butter and green leafy vegetables..."
If the root cause is insufficient dietary magnesium -- due to poor dietary choices -- eating foods that are rich in magnesium, and cutting out refined foods, might be a good start. It would have other benefits, too.
I don't like to see people taking tons of supplements whilst eating poorly.