Not having enough magnesium changes how the heart works. It messes with the heart's rhythm and how it conducts electrical signals. This shows up as ECG problems.