Study leader Dr Ardalan Sharifzadehgan, of the Paris Sudden Death Expertise Centre, said: "There's social embarrassment. They are shocked, they don't know how to react.
"The husband is naked, they are naked, maybe they're afraid to call the neighbours. There's big, big embarrassment. But the take-home message is - you have to rescue your husband."
Dr Sharifzadehgan, who presented his findings at the European Society of Cardiology conference in Barcelona, assessed records on 3,028 people who had suffered a cardiac arrest and were still alive when they were admitted to hospital.
Of these, 246 had been doing physical activity when their heart stopped, of whom 17 - all men with an average age of 53 - had been having sex.
Cardiac arrest occurs when the heart suddenly stops pumping blood around the body - if it is not kept going with resuscitation or restarted with a defibrillator, patients can die within minutes.
Even those who receive rapid resuscitation remain at risk if they do not receive specialist treatment in hospital.
Cardiac arrest is far more dangerous than a heart attack, which occurs when there is an arterial blockage to the heart.
Dr Sharifzadehgan found that fewer than half of the men who had been having sex were given CPR, compared with 80 per cent of the other victims.
He said: "There was less intervention. Women did not give CPR to their partners. This is the big problem here."
He added: "The advice is to never delay calling for help and giving CPR, even in an embarrassing situation. The first thing to do is to call for help in the building or from neighbours, then give CPR."
Dr Sharifzadehgan said people should not be put off sex, stressing it is good for health. However, he added CPR education is vital.
Professor Jeremy Pearson, of the British Heart Foundation, agreed, saying: "Don't stop sex but realise there may be a risk if you have a heart condition.
The British Heart Foundation says those who have had a heart attack or heart surgery can usually resume sexual activity as soon as they are feeling well enough, normally within four to six weeks.
But it advises that it may be wise to ask the other partner to take a more active role.