Hi, there. I take Elavil (same drug) for fibromyalgia pain. However, some doctors believe that in low doses (10-25 mg) this drug can also help with pain/spasms from IBS. However, it can make a person drowsy, and your friend should be at home taking it for the first few days until the body adjusts to it. I take mine at night (to help promote better sleep/reduce FM pain) and I'm still groggy in the a.m. from it (called the "hangover effect").
Some docs believe that depression is part of the IBS cycle, and may prescribe higher doses of Elavil to combat depression. The belief is that less depression, less IBS symptoms. It won't cure IBS, but may relieve some of the symptoms.
Good luck to your friend,