Opioids mediate their effect by agonising opioid receptors in the CNS. Stimulation of these receptors results in the opening of potassium channels which causes hyper polarisation and reduced excitability.
Inhibits openinf of calcium channels
Stimulation of MU receptors in pain relief
Morphine affects the GI tract by decreasing Parasympathetic tone resulting in release of histamine