A lack of physical activity can lead to constipation. For example, constipation often happens after an accident or during an illness when a person must stay in bed and cannot exercise. Constipation is also a common problem following childbirth or surgery.