Stand up straight with your knees fairly close together and facing forward (you can use a support by your side to help with stabilization).
Bring one leg forward and bend the other leg so that your knees are next to each other. Make sure your pelvis is square and facing forward. Stick your bum out and flex at the hips.
Lunge forward slightly with your pelvis to stretch the upper hamstrings.
Bend lower with your upper body to stretch the lower hamstrings