Wot 'e said above, tight hams plus saddle may be too high - if too high it will over stretch your hamstrings when pedalling, which may be the cause. Try lowering saddle by just a couple of mm, and gentle hamstring stretches - only v gentle though, and after your ride, not before. Also Keith Oats may be right - your handle bars may be too low or too far away to reach without straining your back. Try a shorter stem and/or bring stem up by a few mm if you have some stack height left on the steerer to allow this.