Yes I had this. I blame my running shoes. I was sold some ridculously expensive shoes that in trying to correct my over pronation totally altered by running gait and left me with a groin injury that has taken several months to recover from. I kept getting reinjured until I realised what was causing it.
You do need to start strengthening your muscles as pp has said to stop it happening again. I did find hot water bottles useful too.
Hi- I've had this recently, it's painful! I do a fair amount of running so was impatient to get it sorted and saw a physio. He said I needed to strengthen my hips with squats and lunges, and some other more difficult to describe exercises! (Have a look online) It took a couple of sessions of physio and slowing down on the running for a couple of weeks before it felt better.
Even now it does twinge a bit though if I've done too much.