Magnesium can affect muscle relaxation through direct action on cell membranes. Mg ions close certain types of calcium channels, which conduct positively charged calcium ions into neurons. With an excess of magnesium, more channels will be blocked and nerve cells activity will decrease.