suddenly cramping legs?

hello everyone!! i was hoping y'all could help me out because i started my period yesterday and my first 2 days are the heaviest. so i went for a run this morning and could only do a short distance because my legs suddenly started cramping and i was in pain! i was told that exercise was supposed to get rid of period symptoms? any idea why this happened?