I had this, too.
It is the contraction of muscles due to the "fight or flight" reflex. Basically, unconsciously, you are reacting to the stress of life. It is very common. This is where you show/feel your anxiety vs a migraine or something.
It is distressing, because the right side is where major organs are located, and people get afraid and docs will send you for every test under the sun, moon and stars. The fact that the pain moves around is very suggestive of this.
You will probably get a battery of tests and nothing will be found. After this, think about the "fight or flight" reflex. If you want to know exactly what happens to the body with this pick up Hanna's "Somatics".
Save yourself the grief of consulting Dr. Google. I did this. There are probably millions of post about weird right sided pain across the net. All of the posters get tons of tests and have no clear cut results, or, worse, doctors start guessing and removing things like gallbladders. The only ones who seem to resolve this problem are the very few that understand that it is stress.
I ain't no doctor. I can't even spell docter.