since you are @ school swing your legs while sitting. Hold your feet up with knees bent as long as possible. Basically use your leg muscles,thigh muscles, and but cheek muscles. This will keep them at bay.
Dehydration causes cramps so give some juice, liquid diet, and water with one teaspoonful of sugar and a pinch of common salt. Empty stomach, low sugar and sleep disorder/ insufficient sleep also causes cramps.