I am a 26 y/o male and about 4 nights ago, I was sleeping in bed and was leaning sideways in a way that my body is facing right. Then after sometime I tried to change position so that I would be leaning towards left. While I was trying to do that, I experienced a sudden sharp pain in my groin in what appears to be my right vas deferens (I'm not really sure, it's just based from internet image search). From then on until now, the pain has been re-occuring once in awhile and the level of pain varies but it's in the same position (right side) but sometimes it occurs anywhere in the entire pelvic area. By the way, I don't think I feel any lump or pain anywhere when I try to touch it.
Do you have any idea what could be causing this and how could I treat it? Thanks a lot.