Have you had any changes to your pain meds recently, like lowering the dose? The worst part of withdrawal is RLS. If that's not the problem, you might try an over the counter remedy called Hylands Leg Cramps. Hylands Pharmaceuticals makes various homeopathic medications, and this one is actually pretty effective. They have 2 formulas: one with quinine and one without. Check with your doctor or pharmacist first to make sure it won't interfere with anything else you're taking.
RLS resulting from withdrawal can be helped with hot showers or baths, but I don't know if that would help if it's the result of something other than withdrawal. Worth a try anyway! As if you didn't have enough to deal with already, now you get this one. Nothing is worse than having your sleep destroyed when you need it the most.
Living in the Republic of Texas minus a gallbladder, a couple of cervical discs, appendix, uterus, and 18" of colon; but still alive and living with my husband, 2 dogs, 1 cockatiel, 1 quaker parrot and 2 gold fish.