Magnesium during pregnancy

I had my 16 week appointment today and my OBGYN told me she wanted to start taking baby aspirin & 250 mg of magnesium once a day. I had severe preeclampsia with my son and delivered at 34 weeks. I knew that’s why she wanted to put me on baby aspirin, but today was the first I’ve heard about taking magnesium. so, I was wondering has any one else had to take Magnesium during pregnancy? If so, how was it?