It may be painful but it will help to stretch it out and massage the area as the pain subsides. Some of the medications on this list can be taken with the onset of a cramp to help relieve the soreness and tension of the muscle spasms.