The first time it appeared was after a particular week when I did a lot of hard right leg roundhouse kicks. I also played indoor soccer that week too, so I was kicking a ball during that week.
It only seems to happen when my hip is 'contracted' (I guess that's the word), ie when I am sitting for a long period of time, or extended, like when I do bench press. It happens after this.
But it doesn't feel exactly like a muscle cramp, there's just a slightly similar feeling as if something is contracting or spasming.