The piriformis is a muscle that extends from the front of the sacrum. That’s the triangle-shaped bone between your two hipbones in your pelvis. The muscle extends across the sciatic nerve to the top of the femur. The femur is the large bone in your upper leg.
The piriformis helps the thigh move side to side. A piriformis muscle spasm can put pressure on the sciatic nerve and cause symptoms. The result is piriformis syndrome.
The sciatic nerve is a thick and long nerve in the body. It passes alongside or goes through the piriformis muscle, goes down the back of the leg, and eventually branches off into smaller nerves that end in the feet. Nerve compression can be caused by spasm of the piriformis muscle.