When you're constipated, getting relief is usually top of mind. For occasional constipation, taking a laxative or stool softener can be quite effective. In addition, it's often beneficial to determine the cause of your occasional constipation, as this may help prevent episodes in the future. You may be able to figure this out on your own based on your lifestyle and what you eat, but sometimes you may have to visit your doctor to uncover the cause of your constipation.