Magnesium supplements are important in pregnancy. Milk of magnesia is cheap, and works for most women.
Magnesium is used to prevent seizures in women suffering from preeclampsia.
I don’t think it prevents preeclampsia or prevents stroke hemorrhagic or ischemic, liver rupture, liver damage, placental abruption, kidney damage, pulmonary edema, pulmonary embolism, disseminated intravascular coagulation, HELLP syndrome (Hemolysis - destruction of red blood cells, Elevated Liver enzymes, Low Platelets - no ability to clot, hemmorhage) or anything else in severe preeclampsia’s fatal toolkit - just seizures.