I am going to assume you are talking about a charlie horse in her calf, and not soreness after exerising. The two are very very different.
If she feels her leg about to cramp she needs to flex her foot and she might avoid it.
Also, she should be sure to stretch AFTER exercise.
Have her potassium checked at the doctor in a blood test. In the meantime eat bananas more often and other fruits. You can google to find foods high in potassium.
The other blood test she needs is TSH, to check her thyroid. Muscle cramps are very common with thyroid trouble.
One last blood test for her iron level.
If she is a young teen it is likely it is related to growing, and she might have all tests coe out normal, but if one of these is abnormal it is very important. Low potassium is dangerous, and your thyroid affects your whole body. Iron carried oxygen to the muscles, and every other part of the body. It is likely that if it was one of these things she would have muscle trouble in more parts of her body.
if she is sore for a long time after a bad muscle cramp she can take ibuprofen to help, but it is rare the pain lasts long after something like this. She should be careful not to point her foot, which could create another cramp.
I know how painful those cramps are, hopefully they will stop happening soon.