Massaging it while it's in the acute injury stage (which it sounds like it may be), could actually further damage the soft tissues in the area. Try resting it a little, some *gentle* stretching, & most importantly: ICE, ICE, ICE!!! Even just a pack of frozen peas wrapped in a dishtowel will work fine. At least 20 minutes, & if you have time, do a continuous cycle of 20 minutes on (ice), 40 minutes off. This creates a vascular pump, which helps flush out the area with fresh blood & will help repair. The ice also has an analgesic effect (pain relieving, numbing), which will feel great. For the first few mins you'll be swearing, but after that it will feel great.

For the future, make sure you're drinking plenty of water, as dehydration can cause cramping. Also, eat some bananas... they contain good amounts of potassium, which can also prevent cramping.