Have you been drinking enough water? Cramps can also be due to low levels of blood salt, so maybe try eating a little more salt in your diet and see if that helps. Using a heat pack while your leg is cramping may also help to settle the muscle down.
I used to get cramps in my legs a lot when I was in high school, used to do lots of cross country running/athletics, and they could be so painful so I feel for you!