Hemingway's doctors ordered him to abstain from sex?

I read a book recently that briefly discussed the health problems Ernest Hemingway encountered in his fifties. He was drinking too much, had various conditions (high blood pressure, weight gain) and had suffered injuries in plane crashes.

His doctors (understandably) ordered him to stop drinking, but also to not have sex.

I could understand if there were venereal diseases involved. Or if his heart weren’t in good enough condition for sexual activity.

But there was no mention of such conditions.

This was around 1950, and medical knowledge was much less then. Was this like a “women weaken legs!” order?

I’m not sure how certain answers to this question will be, so I put it here. Mods, move as you see fit.

More likely a “high blood pressure = heart attack” plus “sex = heart attack” so “high blood pressure + sex = really big heart attack!” order.

Of course, one of the more common effects of high blood pressure in men is inability to perform sexually. And while sex rarely causes a heart attack, it can happen. Just ask Nelson Rockefeller. So there was some logic in the order, if maybe not scientific validity.