The best thing for this is to heat the muscle up with exercise, hot bath or heating pad, and then stretch it. To expedite healing, rub ferociously into the attachment point, across the fibers (cross-fiber friction) and against the bone. This is easy around the knee, but it’s really hard getting up into the pelvis. If you can get a (close) friend to put their foot into your ass, you’re in business. It won’t be hard to find if it’s sore.
Knowing the difference between muscular pain and ligament tears can determine whether you can continue riding or truly need a break. Take care of your body and stretch on a regular basis – yoga is best.