Opioids are generally reserved for more severe pain that does not respond to other treatments. They may be used after surgical procedures such as hysterectomy or laparoscopy. Due to their potential for dependency and side effects, opioids are usually prescribed for short-term use under strict medical supervision.