Your issue is pain in ankle and feet especially after you be in one position and then when you start walking or stand, it aches a lot.
Here as per your symptoms there are couple of possibilities. It can be due to calcium and vitamin D deficiency. And because of this your feet bones are weak and so that when ever you do weight bearing on legs, due to weak bones it starts paining you.
It can also be due to ankle
sprain along with plantar facitis (inflammation in plantar facia ).
It can also be due to ankle twist along with hairline
fracture if it has happen with you.
How ever it is not possible to rule out any thing with out examination. So I suggest to visit a ortho doctor and let him do a
x ray as well required test and based on that here doctor will guide you for further treatment.
If every thing is fine with bones and its problem related to ankle sprain along with plantar facitis then
physiotherapy treatment along with deeping ankle and feet in hot water at home will Also be helpful.
I suggest use only flat and soft foot wear. And do not do more of weight bearing activities.
I am sure this will be helpful for you. Just follow the advice given above. Take care.