I suspect it's endorphins--but that there's more to it than that.
I've experienced the "runner's high" (and there's even a walker's high, if you walk long and briskly enough) and of course the "cyclist's high" and they feel exactly the same to me. I've also experienced what might be called a meditation high (I am a long-time but currently very slouchy practitioner of Zen meditation), which isn't exactly the same.
I think the endorphin release in vigorous aerobic exercise like running, brisk walking, and cycling enables a better mental state and a better emotional attitude; it's not just an automatic thing like taking a drug. This kind of buoyant, often somewhat exhilirated feeling can cause a good involvement of the will that lasts long after the initial "buzz" is gone.
At least that's how it seems to me.