Thank you for the information,
I feel you should get it checked by doctor.
Pain on walking a distance can be a sign of reduced blood supply to the muscles of the leg.
When you are taking ramipril for high blood pressure, atherosclerosis should be ruled out.
This can be due to a blockage of artery as from cholesterol deposition or atherosclerosis or from spasm of the artery.
Duplex ultrasound, angiography etc can be needed.
Another condition like spinal stenosis where prolonged standing or walking can cause pain.
Deficiency of calcium, magnesium, potassium, sodium- vitamins, dehydration, hypothyroid state etc. are the major factors in muscle spasm.
You may try some home measures-
Take plenty of fluid, fruits, vegetables .
Regular exercise or a walk daily to keep you active.
Stretching or gentle massage can also be helpful.
Avoid coffee, alcohol, tobacco
When it is increasing, you should get it checked by doctor to find out the cause.
Please feel free for any follow up query.