Two things to consider:
1. Vitamin deficiencies. Have your vitamin D tested. My severe vitamin D deficiency resulted in calves and biceps easily cramping into painful charlie horses, and even when not cramping all my muscles in my body easily tired, and when pushed I had uncontrolled shakiness. Taking D was not enough to feel better. I felt significantly better, stronger, and more muscle stamina once I had taken enough to get my blood levels up into the normal ranges. The only way to know is with a blood test. I also tend to have low iron and I believe keeping that number up helps too. Exercise did not help. Pushing myself meant I might pay for hours or days afterwards. Although, some exercise did build some strength, I encourage you to do what you can without harming yourself.
2. Muscle pain in the legs can be an indication that arteries are clogging there and other places in the body, which can be very dangerous. Exercise can help create new arteries and make blood flow better.
I recommend next time at the doctor check:
Vitamin D
CBC
TSH
Vitamin B12
Cholesterol
Or, it could simply be you need to build up your strength and stamina, and overall everything else is “healthy” and over time it will get better.