Warning! Is this how you stretch your hamstring?
Stretch A may aggravate your pain if you have a history of lower back nerve injury. When you bend from your hip with your knee straight the tension is at the back of your thigh, behind the knee. This focuses on the lower hamstrings and also pulls onto the sciatic nerve which originates from the lower back.
The better way to do this hamstring stretch should be with your knee bend at a slight angle and your ankle pointing downwards. This will still focus on the lower hamstrings but not your sciatic nerve.
Stretch B shown below focuses on the middle to upper part of your hamstrings.
The difference between Stretch A and B is that the former keeps the knee straight while bending from the hip; the latter straightens the knee while keeping the hip bent. This gives you more tension to the middle to upper fibres of your hamstrings depending on how much you bend your hip or knee during step 1.
Step 1 - Start off with your body close to your thigh and your knee about 90 degrees bent
Step 2 - Straighten the knee gently while keeping your body close your thigh.
These 2 stretches should be done regularly with a hold of 15 seconds for each repetition.
Stretching your hamstrings safely will help to increase your flexibility, prevent injuries and improve your sports performance.