It sounds to me like a possible pulled muscle or tendon? Remember that more often then not things are not serious, although I know what you mean, it's very easy to imagine the worst. I'd have him seen as well, but honestly...5 year old's are typically pretty active and I'd bet it's something minor like a tendon or muscle issue, especially given that it only bothers him when he moves a certain way. All the best!
I was wondering about a hernia ...even though there is no lump it is still possible , I would have it checked out by your doctor .