Research has found that a deficiency of magnesium in the blood may be associated with arrhythmia and sudden death. Moreover, magnesium deficiency can exacerbate the depletion of potassium and increase the adverse effects of hypokalemia on the cardiovascular system.
https://journals.sagepub.com/doi/full/10.1177/0003319718794573
In addition to its impact on heart rhythm, some studies have also found that maintaining normal high levels of magnesium in the blood is correlated with a lower risk of cardiovascular diseases, primarily ischemic heart disease and coronary artery disease.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5852744/
Other research has discovered that magnesium intake is inversely related to arterial calcification. This indicates that magnesium has a protective effect against stroke and fatal coronary artery disease.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3957229/