Ribs pain is unusual...it's probably te muscle spasm ..i suggest you to check your posture while going to sleep...it mur be postyre related...or sometimes even gastritis seems like that...drink water empty stomach daily ..consult a physician if pain persists to rule out other causes..thank you
Your esr is high. Check your HLAB27. You may be suffering from some form of arthritis.
Also vit d3 is low get supplements for same.
Check in with your orthopedic surgeon and do get properly diagnosed.
Morning pain in ribs is not related to posture, infections or any of that sort. Dont waste time online.
Pain in ribs as you are saying accompanied with breathing can possibly be because of several factors.
(a) Posture related (Cellular device / headphones / anything hard that might be putting pressure onto your Ribs while sleeping)
(b) Spasm related (muscular spasm could be one of the major causes that people feel such kind of pain, usually pain subsides as the spasm is relieved by medication / naturally)
(c) Chest Infection.( rarely if there is infection in chest cavity it may cause pain , check if you are having prolonged coughing,/ excessive mucous secretion by lungs, pain can be linked with coughing,, at times even asthma can be the cause)
(d) unknown cause (several radiological and biological tests should be able to diagnose the exact cause, (x-ray, MRI, Tissue Biopsy)
Consult a physician , to figure out the exact cause.