How to roll out your hamstrings. Hi, I'm Tanya Eberhardt, and this is how to roll out your hamstrings. By using a foam roller, you'll be able to release the contractual trigger knots that cause pain in your hamstring muscles. This will help you reduce spasms and gain optimal muscle length. Move the foam roller underneath your legs, and straighten out your legs on top of the foam roller. Bring your hands behind you. Lean on top of the foam roller, and roll the foam roller up the thighs and then down the thighs. Do a mini dip -- tricep dip -- with the elbows to allow the foam roller to move up and down. Make sure that you roll over the back of the knees, as the tricep extends behind the back of the knees. Also, make sure to work up into your sit bones, as the attachment of the hamstrings is at the ischium tuberosity, also known as the sit bones. Roll out your hamstrings for one to three minutes. The longer you roll them, the more you'll release the trigger contractual knots.