Sorry for the pain
First get an ecg done, just to rule out a cardiac condition
Its most probably a pain from the ribs or chest muscles, not cardiac. I'm saying this because the pain is associated with position, and not exercise.
May be acidity too, but very less probable
Next Steps
take a pain killer and see, if it relieves pain, the pain is not cardiac, and it will go away in some days