Maybe get your liver checked? I am overweight and kept having pain in my lower eight side of my ribs BAD....changng position helped kinda but it would hurt for a couple weeks and then feel better. After eating it hurt worse.
Come to find out I had Fatty Liver :/
If that sounds like whats happening better to know now and see if it can be reversed.
It could be broken ribs or costochondroma. Sometimes people crack ribs without realizing it. A chest x-ray could be done. I'm not sure what causes costochondroma, which is an inflammation of the cartilage of the ribs. It tends to travel around the chest.
Of course, if a rash develops and you have had chicken pox, it could also be shingles.