Muscle spasm - involuntary contraction of a muscle or a group of muscles - is a common feature of many painful conditions. Reducing that underlying spasm can be an important component of managing chronic pain.
Two of my previous entries, When Physical Therapy Can Relieve Pain Fast and Pain Relief at Home, discuss some of the physical therapy approaches to this problem. In particular, massage, heat, and stretching work well to decrease spasm and pain. And don't forget to stretch and use heat before engaging in physical activity that might trigger muscle spasm. Applying ice after exercise is often helpful, too.
If physical therapy isn't adequate to relieve muscle spasm, there are several medications available that can help muscles relax. The biggest side effect to watch out for is drowsiness, so you shouldn't drive, operate machinery, or do anything that requires mental alertness until you know for sure how your body will react.
I often recommend taking a muscle relaxer at bedtime because the reduced spasm and pain, combined with the side effect of sedation, can do a lot to improve sleep.
Ehlers Danlos syndrome and other conditions that result in loose joints are common causes of pain. Some people worry that muscle relaxers may worsen the underlying joint laxity in these patients, ultimately making things worse. Fortunately, that usually isn't much of a problem. The muscle relaxer helps improve their mobility enough that they are able to do some toning exercises and actually improve the overall stability of their joints.
Metaxalone (Skelaxin®) is one of the milder muscle relaxers. In my experience, it also has fewer side effects than most of the others. Cyclobenzaprine (Flexeril®), orphenadrine (Norflex®), carisoprodol (Soma®) and baclofen (Lioresal®) are some other commonly used muscle relaxants.
They are somewhat stronger and so a little more likely to cause side effects than metaxalone, but each person will respond differently to each one. You should discuss with your doctor which of these, if any, is most appropriate for you to try.

