What happened to the rib pain in the chest when I woke up?

The pain in the chest and ribs after waking up may be caused by two reasons: 1) the chest and ribs may get cold when sleeping, which leads to poor local blood circulation and causes the intercostal muscles of the ribs to contract and spasm, and 2) the chest may be squeezed for a long time when sleeping, which leads to local ischemic pain. In both cases, the symptoms can disappear quickly by resting, applying heat or doing local physical therapy, such as infrared therapy, microwave therapy, and medium-frequency pulsed electric therapy. But if, in addition to local pain, there is also chest tightness, palpitations or dizziness, cold sweats, etc., heart problems must be excluded. It is recommended to go to the hospital immediately for an electrocardiogram or blood test for troponin to rule out any angina pectoris or acute myocardial infarction.