What is the discomfort under the right rib cage after lying down?

If you experience discomfort under the ribs on the right side after lying down, you should consider whether there is damage to the ribs or to the soft tissues surrounding the ribs. A strain of the muscles around the rib cage, or an injury or minor fracture to the rib cage, can cause pain and discomfort when the rib cage is squeezed during a change in position, and the pain can be aggravated by physical activity. Some relatively obvious causes, such as falls or sprains or strains of the chest, or less obvious causes, such as sudden sneezing or violent coughing, can cause similar symptoms. The intercostal nerve is squeezed by the misalignment of the thoracic vertebrae, resulting in discomfort under the ribs on one side of the body after lying down, which is often seen in people who have been in a fixed position for a long time.