The gluteus medius is located on the side of the gluteus maximus and is about half the size of the latter which is your main hip extensor in exercises such as the deadlift. The gluteus medius helps stabilize the extension, actively rotates the hip and does hip abduction. It isn’t usually tight, but rather weak and inhibited. It benefits most from activation and strengthening exercises. What is often tight is the TFL (tensor fascia lata).
It’s a good idea to start by foam rolling the TFL and IT band to see if it’s this that is tight and not the gluteus medius.
If your gluteus medius is in fact tight, try the following gluteus medius stretch:
To foam roll the gluteus medius (and piriformis), place the roller under the side of your butt just behind the head of the femur. Balance on your elbow and roll away from top to bottom.
For more information on glute stretching, see the companion article for gluteus maximus stretches