Scientists identified a compound in saliva that can relieve pain; it is called opiorphin. Investigators have also spent some time evaluating the efficacy of this compound, which appears to be a promising potential analgesic. Learn more about it from this SciShow video.
Because researchers are always on the lookout for better pain-relieving drugs, especially non-addictive ones, they wanted to know more about this chemical that we produce naturally, so they learned more about how opiorphin works. It impairs enzymes that break down enkephalins, which are another class of chemicals that help stop pain signals from reaching the brain. That means opiorphin makes the pain-relieving enkephalins stick around longer.
Opiorphin tends to get broken down quickly, so it doesn't hang around in your mouth, making it numb or causing other effects that you can sense. It remains to be seen whether it will be developed as a therapeutic; researchers have to figure out what other effects it may have.