The piriformis is a busy muscle. It is involved in almost every motion of the hips and legs.
The piriformis muscle is a flat, band-like muscle located in the buttocks near the top of the hip joint. This muscle is important in lower body movement because it stabilizes the hip joint and lifts and rotates the thigh away from the body. The piriformis enables us to walk, shift our weight from one foot to another, and maintain balance. It is also used in sports that involve lifting and rotating the thighs.
Specifically, the piriformis muscle is part of the lateral rotators of the hip, along with the quadratus femoris, gemellus inferior, gemellus superior, obturator externus, and obturator internus. The piriformis laterally rotates the femur with hip extension and abducts the femur with hip flexion. Abduction of the flexed thigh is important in the action of walking because it shifts the body weight to the opposite side of the foot being lifted, which keeps us from falling. The action of the lateral rotators can be understood by crossing your legs to rest an ankle on the knee of the other leg. This causes the femur to rotate and point the knee laterally. The lateral rotators also oppose medial rotation by the gluteus medius and gluteus minimus. When the hip is flexed to 90 degrees, piriformis abducts the femur at the hip (Netter’s Clinical Anatomy, 2010)