Muscular cramp can be caused by a loss of hydration and or salts. Make sure you drink enough, not merely at lunchtime but throughout the day. A sip or gulp here and there will do. There is the saying, that if you feel thirsty, you've gone over the point at which you ought to have taken so liquid. A little and often will do you good, especially when you consider, that a 10% drop in water equals a 40% loss in the body's ability to process nutrients and supply energy.
As to loss of salts, (and or a drop in magnesium & potassium) levels - make ensure you have some salt in your diet. You may not like the taste of very salty food but, you could get away with eating some processed foods, as they normally have plenty of added salt. I personally carry two water bottles in the car and one in the rucksack. But one of the car bottles contains 9:1 mix of light soy sauce, (plenty if salt in a tiny sip).
Potassium is found in many foods but tomatoes, especially fresh ones of rich in potassium. Magnesium is found in spinach, nuts, peas and unrefined whole grain foods amongst other foods.
A vitamin B complex is also good to have. I drink tonic water, though without the gin, as the quinine helps to relax muscles, (though some information sources say quinine should only be used to help counteract cramp, when all else has failed).
In short, if you don't want to drastically alter your diet. You could take:
•A daily multivitamin supplement & keep hydrated throughout the day
•Take a combined potassium & magnesium supplement & keep hydrated throughout the day
•Ensure you have enough dietary salts & keep hydrated throughout the day
•Take a vitamin B complex & keep hydrated throughout the day
•Take to the bottle of tonic
•And keep pre & post stretching the muscles
Note. If you already have high blood pressure. Don't overdo the fresh tomatoes, as a high potassium level, will make your blood pressure sky rocket.