The Piriformis muscle is a deep muscle of the hip located in the buttocks region. The Sciatic nerve is intimately related to the Piriformis muscle. Depending on your anatomy the Sciatic nerve passes either below or through the Piriformis. When the Piriformis becomes tight it places pressure on the Sciatic nerve placing you at risk for sciatic pain down the back of your leg. There are many ways to stretch the Piriformis. Here is one of my favorites that Jan, my favorite Fitness Instructor taught me.
Stand in front of a chair where the seat is level with the groin area. I have also done this stretch after spin class using the bike seat. Simply adjust the seat of the bike to the correct height. Next place your lower leg on the chair, or surface you are using with knee bent as shown. You should feel the stretch on the outer hip, buttock region. You can place gentle pressure to your leg to enhance the stretch. You can also bend forward from the hips to give a deeper stretch.
Just remember all stretches should feel gentle not painful. Deep breath and relax while stretching to get the most benefit. Hold stretch for 10-30 sec.