When I'm laying down and when I yawn or take a deep breath, I have a pain in my middle back to the left?

Rib? Pain caused by malfunctioning ribs is missed by most docs. Commonly, when a rib is 'stuck' downward (in exhalation position) and the front of the rib will not rise during inhalation, deep inhalation provokes pain as the other ribs try to rise. Sometimes the pain is achy, but more often very sharp. Consult a good osteopathic physician who does manipulation for a proper assessment & treatment.