If you can still feel it, bearing in mind you've had this happen the last few times you've been on the bike, then I'd rest it, ice it and perhaps stretch it or use roller on your hamstrings, certainly the first two. If it doesn't clear up I'd consider a sport therapist/Physio but I'd be cautious riding on it until it doesn't react.