The piriformis muscle is a deep pyramidal shaped flat muscle in the buttock region that originates over the sacrum and inserts over the greater trochanter of the femur. This muscle lies deep to the gluteus maximus and helps to externally rotate (or rotate away from the center of the body) the hip.