Lying on the ground, flex one leg at both the hip and the knee and “hug” it with both hands, pressing the leg against the chest. The other leg remains extended on the ground.
This fairly simple exercise stretches the gluteus of the elevated leg, but the hip flexors of the extended leg are also stretched. People with lower degree of flexibility will notice how the leg that should remain on the ground naturally lifts up, something that should be avoided (for example, by placing the foot under a bar).
In this exercise, the assistance of a partner could be quite useful. The partner presses the elevated leg against the chest of the person stretching, while at the same time holding the opposite leg down on the floor (at the level of the tibia) in such a way that the leg is held down but not pressured.