Long-term health effects of endorphins?

I was thinking about endorphins during a long car trip this week, and it occurs to me I’ve never heard any trustworthy discussion of the long-term benefits/risks of endorphin release. As I understand it, the term “endorphin” describes a class of around two dozen chemicals released by the body that act like neurotransmitters. They have analgesic effects, and for this reason activities that promote endorphin release cause a euphoric sensation (and the list of activities that do this seems to grow every month – I’ve heard everything from heavy exercise and sex to eating chocolate and knitting).

Of course, exercise and sex have health benefits, but those aren’t because of the endorphins. My question is: do we know whether endorphins themselves increase longevity or have other health benefits, apart from encouraging you to repeat the behavior that caused their release? Also, as a folllow-up: are endorphins associated with any negative health effects? This seems possible, since they’re chemically similar to opiates.