It takes quite a long time, since these muscles are involved in most activities of daily living. A good recommendation is to take stairs on the “down with the bad, up with the good” principle. This will off-load those muscles in a frequently used movement. Don’t stretch them while they are getting better. Take care. I hope they are better soon.