Hello
Welcome to health care magic.
Cramps in legs at night can be due to mineral deficiency/overexertion with inadequate hydration/early sign of
restless leg syndrome.
If cramps come immediately on doing physical activity and relieves on resting ,it can be due to
peripheral artery disease.
I would like to know your age and if you are on any medications.Certain medications may cause
electrolyte imbalance and give rise to such symptoms.
If symptoms seem to be of that like peripheral artery disease,Colour doppler scan blood flow of of legs will be required.
I would advise you to undergo certain tests like
calcium deficiency,fasting blood glucose.
Maintain adequate body hydration.If you are doing vigourous physical activity,take pauses between activity and have drinks with electrolytes.
If calcium deficiency found,regular calcium supplementation may be needed.
Use local warm compresses when you get the pain.
Local muscle massage and muscle relaxation exercises will help with the pain.
Avoid smoking,alcohol and caffeinated drinks .
If not relieved by these measures or you start getting numbness tingling in legs,consultation with specialist like general surgeon/
neurologist may be needed.
Hope I answered your query.
Feel free to ask any more doubt.