After living with chronic pain for a long time, your range of physical movement may have become very limited. Many muscles become weaker, and joints that are not used regularly stiffen up. There's a natural tendency of compensating for weakness by walking stiffer, which again causes secondary muscle spasms and muscle pain.
A great way of breaking this negative cycle and rebuilding strength is to go back to the basics - learn to walk again using the core muscles of the pelvis, spine and thighs by breaking up the movement into it's separate parts to get a natural rolling movement into your walk which .
Many physical therapists offer this kind of training, called core integration. I learned it from a therapist who had a background in somatics. She had us lying on the ground training how to reconnect our hips, knees and feet in a rolling motion in order to get power into a natural walk without using too much energy.
This video gives you the general idea, but you can do this yourself at home - the trick is to start really slow and roll the weight forward on your feet for each step as you walk.