Pain in the ribs when sleeping is common for the following reasons: First, local compression damage, if the patient sleeps in the side position for a long time, one side of the ribs is subjected to long-term compression, which can lead to local blood circulation disorders, causing local tissue damage, which can lead to clinical symptoms of rib pain when waking up the next morning, and can be accompanied by local swelling, and respiratory activity can also be affected. Second, viral intercostal neuritis, if the patient gets cold at night, it can easily lead to viral infection, the virus enters the respiratory tract and blood circulation will involve the intercostal nerve, thus causing intercostal nerve inflammation, the patient will also have clinical symptoms of rib pain when waking up in the morning, usually the pain range includes the whole intercostal space, and will also affect the breathing activity. Therefore, it is important to diagnose and treat rib pain in a timely manner when it occurs after sleeping.