You need a full-scope practice such as AYP etc as merely stretching muscles won't necessarily get to the roots of such issues( indeed stretching on it's own can for some people actually make things worse causing msucles to tighten as a reflexive cause/affect action).You can tackle those roots by supplemeting say asana if you currently do that with some pranayama and meditation using proven and effective techniques and sound principles ssuch as outlined in the AYP lessons.
That's just what i've learned and indeed experienced first-hand.If you don't already have a fuller-scope & balancing practice or are interested in broadening your tool-set then consider trying out AYP.
I have heard pulled or painful muscles are helped by massage, particularly at the insertion point, which is where the muscle connects to the bone (google muscle insertion; or muscle origin; or muscle attachment point).