Pulling a hamstring means you've torn the fibers of one or more of the three large muscles that run up the back of your thigh. Hamstring injuries happen when the muscles are not properly warmed up before exercise, when a sedentary lifestyle leads to weak muscles, when a rigorous sport overtaxes hamstring strength or when a sudden movement stresses a tight muscle. You can and should stretch a pulled hamstring to rehabilitate it. But it's important to ease back into flexibility gradually.
Take It Slow
The first two or three days, during the acute stage of the tear, you should rest, stay off the leg as much as possible, ice and elevate the leg according to the instructions of your health care provider. As the pain decreases and the muscle starts to heal, begin light stretching to encourage some elasticity. Lying on your back for supine stretches takes the tension off the muscle so you can lengthen it when it's not engaged. Work only if the stretch is pain free. Spend a week or so gradually resuming easy stretches until the injured leg moves as freely as the healthy one.
Stretching after a hamstring pull should progress at the rate your muscle heals -- you can't push flexibility without risking re-injury. Try stretches that adapt to your wellness level: seated hamstring stretch, lying bent-leg stretch, wall-supported stretch, straight leg raises, leg swings and cycling. Work both the injured and uninjured legs for balance, holding stretches for about 20 seconds with as few as five repetitions.