Do a series of stretches at least twice a week. Pay special attention to muscles that tend to get tight and spasm, like the quadriceps, hamstrings, and calves. As you stretch, slowly move each muscle into position. Hold the position for up to 1 minute, then gently release it.
You can do these exercises alone, or you can work with a physical therapist who will show you how to do each movement safely and effectively.