I will occasionally get severe pain in different joints for no apparent reason. My doctor has prescribed me Tramadol for occasions where I have intermittent pain, and that seems to help. I try and stay away from opioids in general, but I haven't found a tendency in myself to want to over-use these anyway.
Other things that can help me are exercises and stretching, heating/cooling pads, warm baths and/or topical pain creams.