From the Buddhist perspective, sex is this energy that causes attachment, and therefore suffering. As much as people talk about equanimity and balance and whatnot with sex, the fact of the matter is, sex causes attachment. His Holiness the Dalai Lama went so far as to say that of everyone he knows, and he knows a lot of people deeply involved in Tantra, that not a single one of them is actually capable of balanced, fully un-attached sex. He also said that while it is theoretically possible to have the equanimity to have sex without forming attachment, that the individual who could would also be able to eat dog shit with the same relish as chocolate cake.
The Buddha prescribed celibacy for exactly this reason, but frankly some of the things he said about sex suggest a not-fully-healthy relationship with it, all this weird aversion stuff. I certainly don't choose to be celibate, but I also try to walk into every sexual situation as aware as I can be. Aware that it'll form attachment, aware that it'll lead to future suffering, and aware that I'm signing on for that, usually in exchange for human intimiacy, learning about myself, growing as a person, and yeah, a bunch of sensory pleasure.
I'd say the way to integrate the two is just to exercise mindfulness. If the mindfulness interferes, maybe it's a sign that you're using sex in an unhealthy way, to cope with something or as a manifestation of denial, or something. If you can be mindful of your sexual experiences and enjoy them, that seems like a pretty solid integration to me.
I mean, that's really hard, though. I know I don't always do it, for sure, but we can aspire, right?