Welcome to the forum. Sorry to hear of your leg pain. I suffer from leg and foot pain as well and have been put on a narcotic and Lyrica to deal with the pain. Mine comes from fibromyalgia. I have had it since I've been around 28 and although they say it is not a progressive disease, I disagree as I, as well as others, have deteriorated over the years.
about ten years ago, I retired and slowly I lost the ability to stand in one place for very long. Like you, after I rest for a while, I can try again, but it only lasts for a while before I have to sit again. I cannot walk very far either, plus, I now wear oxygen. I use a wheelchair when I go out for these problems.
Have you ruled out fibromyalgia? Have you been seen by a rheumatologist? I'm not saying it is what you have, just inquiring if it has been discussed before.
I have empathy for you, my friend and hope you get some answers soon. Please come back and share with us your status and at the very least, let us give you support.
God's blessings for you.