in my view if you say that during when u take in a deep breath there is pain, so it can be muscular pain. Moving the muscle will induce pain.
I would see a chiropractor, it appears to me that you could have some vertebrae out of alignment, and, when you sit or lie down certain ways, it hurts. You could even have a rib or two out.