Prevent the injury from occurring in the first place. Always warm up before exercising. Doing so relaxes the muscles and gets blood flowing to the tissues. Warm muscles are less likely than cold muscles to be injured. Warm up with a few minutes of walking or gentle stretching.
Check out the HowStufWorks take on whether bananas are better for you than sports drinks.