Underneath the gluteus maximus are the deep six lateral rotators on the back & side of the hip joint. When we are in anatomical position, as their name implies, they function to externally rotate & abduct the hip. However, when the hip is flexed, the orientation of these muscles changes & external rotation is actually needed to stretch these muscles (ie: pigeon pose).
This muscle group is comprised of the piriformis, gemellus superior, obturator internus, gemellus inferior, obturator externus, & quadratus femoris. These attach to the pelvis & the back part of the greater trochanter of the femur. If the piriformis is tight, it can compress the sciatic nerve causing a number of sensations such as pain, tingling, or numbness. The sciatic nerve runs just below the piriformis before heading down the back of the leg. Oftentimes, any pain in the gluteal region is attributed to the piriformis, but is usually a good deal less simple than that & is a result of tightness or imbalance in a number of muscles in the area.