Yes, absolutely! As soon as you feel a leg cramp coming on, flex your food so your sole is flat (do NOT point your toes) and, if you can, put weight on that leg. Pointing your toes makes the cramp worse.
You have low magnesium levels - ask at the Pharmacy for help with getting more magnesium into you. Yes: more bananas helps as a dietary source of magnesium. The herb Cramp Bark is magic for easing cramps - talk to a Herbalist about use and supplies. If I get leg cramps badly, I jump into a shower and gradually turn the heat up until it is almost unbearable - THAT will end a cramp in seconds. For preventing cramps, I use a mechanical massage unit over the calves and thighs to maintain better circulation - especially of the lymphatic structures. That way, cramps are a rare visitor. Poor circulation, low magnesium, lymphatic stasis are the causes of leg cramps!!!
I just learned this today: take a bar of soap and put in a thin sock. Place bar of soap on or lay hurting part of leg to touch bar. It takes pain away. Let me know if it works. It is not a joke. It is an old wise tale for home remadies. Good luck