What's a medication to relieve constantly going to the bathroom?

Depends. If its frequent urination, prostate, bladder infections, bladder nerve conditions may be the cause as well as diabetes.If its bowel movements it could be conditions like colitis, excessive fiber intake (or other dietary issues). Best to check with your physician.