Professor Stuart Brody, of the West of Scotland University, Paisley, and his colleagues conducted the study and found that unprotected heterosexual sex can significantly boost men and women's mental wellbeing.
On the other hand, heterosexual sex with a condom is linked to poorer mental health, the study showed.
According to Brody, mankind is biologically programmed to enjoy unprotected sex because it gives couples an evolutionary advantage and maximises the chances of reproducing.
"Evolution is not politically correct, so of the very broad range of potential sexual behaviour, there is actually only one that is consistently associated with better physical and mental health and that is the one sexual behaviour that would be favoured by evolution. That is not accidental," the Scotsman quoted Brody as saying.
The researchers studied the sexual behaviour of 99 women and 111 men in Portugal.
They filled in questionnaires about the pleasure they derived from their sex lives and contraception use.
Using a measure of psychological health developed in Canada, Brody concluded that condom use was linked to members of the sample who exhibited problems dealing with stress.
He found that those who had unprotected sex appeared to be able to deal with stress in a more mature way by taking effective action. They also had better mental health.
However, his conclusions have been criticised by sexual health campaigners, who warned that unsafe sex leads to unwanted pregnancies and diseases.
Tony Kerridge of Marie Stopes International, the leading sexual health and reproductive health organisation, said: "I would have thought that the mental health of anyone would be tested if they found out they had a sexually transmitted disease or that there was an unwanted pregnancy.
"Particularly in the case of casual relationships where there is no desire to get pregnant, advice should always be that condoms should be used," Kerridge added.
The study has been published in the academic journal Archives of Sexual Behaviour.