Opioid analgesics are typically prescribed for severe cases of acute pain, and for instances of chronic pain. Muscle relaxants are prescribed to reduce spasms and cramping of the muscles.