I have sex with my fiancee multiple times a day (for my own pleasure, not his, by the way) and every single time we are intimate while I am under the influence of painkillers I find it impossible to become sexually excited or climax. He experiences the same, and frequently finds it impossible to keep or even achieve an erection. Luckily, we are usually on the drugs together which makes us basically two stoned kids trying hilariously to have sex for hours with no success. Opiates are a central nervous system depressant that sometimes disallows excess blood flow to the genitals, prohibiting you from getting "horny". At my age, my hormones are rushing at my brain like Mongolians to the Great Wall, so it isn't difficult for me to regain desire after a bout of long-term (less than a year) daily use.
If I were you, I wouldn't combine
Viagra with a CNS depressant, due to the possible complications that could result. (If you've ever read some of Viagra's side effects, you wouldn't be chomping at the bit to try it anyway, probably.) I personally think if you wait until the medication's effects completely wear off, you can successfully have intercourse before it is time for the next dose. That's what I do.