Pain can also be caused by prolonged external rotation of the hip so that the piriformis muscle is shortened. If the sciatic nerve is compressed for an long time there may be aching in the leg and pain in the low back.
Shortening of the muscle and compression of the nerve is the most common cause of piriformis syndrome, but overuse of the glutes and other muscles in the hip can also cause muscle spasms of the piriformis. Other factors in this syndrome include poor body mechanics and posture, gait problems.
Stretching and strengthening are the best treatments for piriformis syndrome. This muscle rarely gets stretched, so a simply stretching routine can often work wonders.
If stretching alone doesn't help check with a physician or physical therapist who can check your pelvic and foot mechanics.