Opioid analgesics are primarily used in gynecology for managing acute pain post-surgery, such as after a hysterectomy or cesarean section. They may also be utilized for severe pain associated with conditions like endometriosis, pelvic inflammatory disease, or during certain diagnostic procedures.