Don't perform strenuous physical activity especially in hot weather if your fast involves not drinking water
If your fasting includes abstaining from drinking water, such as during Ramadan fasting you should avoid performing activities that will deplete your body's water reserve. Dehydration can cause liver damage. Of course it's great to work out mildly a couple of hours after breaking the fast to re-energise the body and keep fit.
Do drink a small glass of tonic water if you get muscle spasms.
There is enough quinine in the tonic water to relax the muscles and has a lasting effect that carries you through the next day. No need to over do it though as Quinine is not something you want to have on a daily basis and tonic water has lots of sugar.
Of course, if you want to relax the muscles with less calories you can try the Nowrish's Healthy Fasting supplement. No added sugars, easy on the body but effective against muscle cramps. Costs less than a bottle of tonic a day!