Leg cramps at night

MW

The past week I have been woken up throughout the night with bad leg cramps. The go all the way from my hips down to my calves. I take magnesium everyday, drink lots of fluids and have been using a pregnancy pillow. does anyone have any other tips that have experienced this???