An aspect missing from the article and comments here is that magnesium is also available as a topical application. I have some in a spray that I can apply to my knees before bed, we also get some from a local source in a cream base for massaging into muscles. That lets you focus the application without dosing your entire system with it.
It is worth noting that these topical applications are quite controversial in the medical literature. The evidence supporting a dermal absorption of magnesium (or other electrolytes) is pretty poor [1].