Muscles pain can be due to deficiency in Vit D or Vit
B12.
Other than this due to bad posture or continuous sitting can affect your back which might indirectly affects your legs.
Next Steps
Best option- Do blood test to check vit d/vit.
b12 level and start treatment accordingly
OR
Start Vit D3 once a week for 6 weeks and Vit B12 daily for 3 months
Health Tips
Avoid long sitting take breaks.
Build Your muscles endurance by either walking/cycling 4-5 times a week for 45 min