Constipation due to medication such as Soma or Flexeril can be treated by staying hydrated, eating enough fiber, exercising regularly, consuming probiotics, and taking natural laxatives.