Exercise, plenty of fluids and fiber-rich diet can be helpful against pain. Eat lots of fruits, vegetables, berries, potatoes and whole-wheat bread. Wheat bran, oatmeal and prunes also increases bowel activity, and is recommended. Eat cereal with kefir or yogurt.
Laxatives can cause contractions of the uterus, and should generally not be used during pregnancy. At very troublesome constipation may still laxative agents such as lactulose (Duphalac ®) is used. Talk to your doctor.

Iron tablets give a tendency to constipation. Many pregnant women taking iron tablets unless necessary. Talk to your doctor about this.