hi The Flash or Greg - which do you prefer?
From your description, it sounds like a sprained rib.
When you lie on your side leaning on the elbow etc...that is stretching your ribs and the few seconds for your body to iron out the kinks is just all those joints back into place.
Obviously it is hard to work out what is exactly wrong with you without assessment but...
1. I would be at least 90% certain you have either a sprained rib or a strained little muscle next to your rib joint
2. No specific medical test (think X-ray,MRI, CT scan, ultrasound etc) would sort that out for you.
3. I suggest you see someone who is good at diagnosis and treatment of rib problems - believe me when i tell you that few are truly good at it
4. If you want to try solve it on your own (not recommended), then i would suggest that 3-6 weeks should do it...at 3 weeks a lot of the pain will have subsided but would be easily aggravated. You would need to lay off the weights for the upper body - even push ups etc. This is because i haven't assessed you to be able to tell what is ok and isn't...which is why seeing someone can be worth the time and money. Leaving it to "get better" on its own doesn't guarantee that it will be able to cope and may possibly become a "weak spot" in your back which is easily sprained again.
I would suggest that you ring around, ask them if they can fix rib problems and how. Explain that you have enough money for 1 x1hr session and no insurance. You would want an assessment, explanation, treatment and a home program with progressions so you can take care of it on your own. Take a video and record how to tape your rib if it is applicable - i love these new smart phones...no more fiddling with cameras and webcams and permission and transferring to CD etc!
Hope that helps - not such a strange back pain after all!