Nothing will definitely rid you of the cramp. Use pillows particularly in bed under the knees, or between the calves to give support. Massaging the affected area gently will help to relax the muscle which is in spasm, or using a hot water bottle is often soothing. Stretching the affected muscles by extending the foot and bringing the toes towards your body a few times should reduce the acute pain.