The first thing to go in a troubled relationship is sex. If we didnt have kids i would have ended it years ago
The first part of this statement is clearly wrong. The trouble comes first then the sex dries up. The second part of this statement is likely correct, for your wife too.
One poster has already quoted "Men want sex to feel loved, women want to be loved to want sex" This is a generalisation, as I suspect that there are a fair few women who don't operate like this.
I think that "Familiarity breeds contempt" is just as likely true, especially if its true of most women that they need to feel loved, (desired, supported and understood) but just as true if some women prefer novelty and simply get bored of having sex in perpetuity with the same person. Either way I think what is true is that men underestimate the many small ways in which their massive planet sized egos, sense of entitlement and lack of tact and empathy effect their partners. I was brought up to have self esteem and whilst this works well for me, not so much for the men I have ended up with. I am not quick to forgive every transgression of my boundaries, and my boundaries are fairly clear. I expect no less respect from my husband than he would show a huge muscle bound axe wielding male maniac on steroids......because in my experience ""Familiarity breeds contempt" or at least men often analyse precisely how little effort, contribution or compromise they need to make, with a very simple sum: Women want to be loved, women want monogamy and commitment, women are vulnerable once they have children etc + I'm the man in the equation = so what is she willing to accept?
Either way, women want to be loved, or perhaps women like men quite like sex, and some women quite like to have sex in order to feel loved (as I'm sure many do, me included) and quite like sex for its own sake, most women will go right off the idea with a man who has in some way harmed them, or even just through a series of seemingly small acts of disrespect, unkindness or lack of support will grow to feel unsafe with that man.
For me, (most women have had one night stands where they didn't feel loved in the five minutes before they DTD) a known entity that feels unsafe is far less attractive that a completely unknown entity. Afterall novelty and risk can be attractive. If someone proves themself (familiarity) to be unreliable and can't be trusted to care/take care then contempt (or at least aversion) is a very reasonable response.
My advice: no more talk about sex. If you are going to talk about anything ask your wife how you and your habits, your contribution or otherwise make her feel? Not just about practical matter, but how you communicate to her and ask yourself the question "Do I respect her?"