There are two types of analgesics: anti-inflammatory medications that relieve discomfort by lowering local inflammatory responses, and opioids that operate on the brain. Since they would promote sleep, opioid analgesics were once considered narcotic medications.