chief alkaloid of opium (used as a narcotic pain-killer), 1828, from French morphine or German Morphin (1816), name coined by German apothecary Friedrich Sertürner (1783-1840) in reference to Latin Morpheus (q.v.), Ovid's name for the god of dreams, from Greek morphē "form, shape, beauty, outward appearance," which is of unknown origin. So called because of the drug's sleep-inducing properties.
<a href="https://www.etymonline.com/word/morphia">Etymology of morphia by etymonline</a>
Harper, D. (n.d.). Etymology of morphia. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/morphia