When I’m stressed I don’t want to have sex

I can’t explain it to my boyfriend, but also I find it infuriating. How can I learn to see sex as something fun and relaxing?
We all have our own ways of dealing with stress. Some choose yoga, others choose vodka, but the best way to deal with stress is sex. Seriously. Physical intimacy and orgasm release a flood of feel-good chemicals, which counter the spike in stress hormones. The Catch-22 is that, in women, elevated levels of cortisol and adrenaline decrease the production of the sex hormone, testosterone.