They sneak up on you suddenly and are over mercifully quickly, but cramps can be excruciatingly painful for those who get them.

[Read more: 4 easy foot exercises to relieve the pain of bunions]

And it’s not just fitness enthusiasts or frequent runners – high-heel wearers (and those who exercise very little at all) have to suffer too.

Physiotherapist Tim Allardyce answers all your questions.

What causes cramps?

“The nerve impulse fires to the muscle in an erratic way, so the nerve causes the muscle to spasm involuntarily,” explains Allardyce.

“The reason it does that is usually because there’s a lack of ions, like magnesium and potassium, or electrolytes, like salt, and this causes a disruption in the flow of the nerve.”

Why does cramp happen?

“The big problem here is people are low in salt, which is an electrolyte,” says Allardyce.

“Lots of people come to me saying, ‘I suffer from cramps’ and the first question I ask is, ‘How much salt do you have in your diet?’. They all expect it to be a bad thing, so they say, ‘Oh no, I never add salt to my food’ and I go, ‘That’s your problem’.

"If we don’t have salt, we don’t have the nerve conduction and if we don’t have the nerve conduction, the muscles cramp. Man has evolved to need salt.”

[Read more: Often in pain? Double-jointed? You could have Ehlers-Danlos syndrome]

Don’t go overboard on the salt though – the NHS recommends no more than 6g or a teaspoon a day for adults and half that for children from the age of four.

So can we just eat a packet of salt and vinegar crisps?

“No! Most of us eat the wrong kind of salt, processed salt which is basically sodium chloride and has a low nutritional value,” warns Allardyce.

“Table salt is rubbish! If you’ve got some in your house, pick it up and put in the bin. What you need is a good quality sea salt, like Cornish sea salt or Himalayan sea salt or an organic sea salt. It’s packed with minerals.

“Ready-meals are packed with bad salt because it’s a preservative, so you’re not getting nutritional salt in your diet. Sprinkle a pinch of organic sea salt on your chips before you go to bed each night and see if the cramps improve. Also, make sure you drink lots of water to keep the muscles hydrated.”

What if the salt doesn’t work?

“The really stubborn ones usually need magnesium – it’s a magnificent supplement because it does so many good things to the body. But you’ve got to be careful with it because I’ve got a few patients who’ve had a negative reaction to it so you need to start with a low dosage. The other thing to try is an electrolyte sports drinks like Lucozade. I think it’s got too many sugars in but potentially any electrolyte drink could help stop cramping.”

[Read more: Reduced joint pain and 6 other reasons to get back on your bike and take up cycling]

Anything else I can do to stop them?

“You need to exercise. Most people get cramp in their calf muscle, which gets short and tight if you don’t exercise. So a really good way to stop cramping is to get the calf muscle stretched and strengthen it.

“A great stretch is standing on a step and dropping your heels. Put both feet on the step, and drop your heels below the step which gives a lovely long stretch through your calf muscles. It’s really safe and anyone can do it. Do it every day, for three lots of 30 seconds, for four weeks and see if it helps.

“To strengthen the calf, do the opposite, a heel lift – so stand on the step and pull your heel up, and go up and down. Do 10 reps to strengthen the calf. Or you could just jog or cycle. Anything that moves the foot and the leg will help the calf.”

Why do high heels give me cramps?

High heels put too much pressure on the ball of the foot and the toes

“They’re putting too much pressure on the ball of the foot and the toes, rather than spreading the load more evenly through the foot and, with high heels, your shoe tends to cramp your toes together, so your feet get stuck in a cramped position and go into spasm.

"The only way to relieve it is to get your toes out and stretch them out.”

What should I do when I’ve got cramps?

“With cramp in your calf, you pull the toes towards you,” explains Allardyce.

“Most cramp happens when you’re lying in bed, so just pull the toes towards you and that will stretch the muscles. You should notice them ease in a matter of seconds.”

Like this story? Why not share it with your friends by clicking the orange plus sign?