First you need to rule out the other causes of pain
It can be due to obesity , varicose or
vitamin deficiency leading to muscle cramps
For varicose veins
You can wear graduated compression stockings to reduce symptoms
Avoid prolonged standing and wherever possible just elevate both legs by resting legs on pillows
There are certain medications which can help reducing the symptoms but once varicosity develops , it doesn’t get reversed by meds
Next Steps
Consult a surgeon get usg Doppler and other blood tests