I had the same problem. I Found masturbating to porn over long periods of time daily can lead to problems. Its not just watching porn but HOW you masturbate. The grip of your hand is a much more intense feeling then being inside your woman with a condom on. Your brain/penis get trained to the sensations of your hand from constant masturbation. Especially if you masturbate for say 30min to a hr before orgasm. Opposed to just a quick 2 min session. I recommend cutting back from porn and masturbation as much as you can. And if you must do it, use light pressure of your hand, and make it fast. Even try masturbating with a condom on.I'm no professional just speaking from experience. - Good luck
PS People say masturbation and porn is normal and healthy. But theres a thin line between healthy and overboard.
Are you masturbating frequently? If so, cutting back a bit might help you stay hard during sex.