Hamstring injuries can be common amongst cyclists and are often frustratingly slow to heal. Stretching is vitally important to maintain length and elasticity to help prevent injury.
Unfortunately, Hamstrings can be frustratingly slow to release too, so a short little pull on them isn’t going to make a great deal of difference. Be sure to hold any stretch for at least 30 seconds, which is roughly 5 to 10 slow breaths (in and out counting as 1 breath).
Here’s a great yoga pose to stretch Hamstrings with an alternative (legs up the wall) if yours are particularly tight.