Hi Lisa--Xanax is in the same class of drugs as valium. There are some suggestions (not quite evidence) that they may work in some of the same ways as neurontin. They do effect the same neurotransmitter system. Also, being "relaxed" is usually pain-relieving to a certain degree, and especially if spasm is any part of one's problem.
valium and xanax are equally addicting, creating the same kinds of dependency and loss of efficacy without increasing dosage over time. For short term and occasional use, however, they can be very effective.