Your glutes work to straighten your leg from the hip and are more powerful than your thigh muscles. They are important core muscles too so important to stretch.
To stretch lie on your back and draw your knee over your body with the opposite hand. Keep your other arm out to the side to stop yourself rolling over. Move your knee up and down until you find a good stretch.
To progress to stretch the deeper piriformis muscle which can often be uncomfortably tight, lying on your back take one knee towards your chest, wrap your other leg behind to push your top leg further up. With your hand push the top knee down and away from you. You should feel a nice deep stretch in your hip.