All religious people and even common people that sex is best for happiness and sanctioned it via the institution of marriage
Satbir Singh Bedi | 25 Aug 2013

It is the news that frustrated partners have probably been longing to hear - regular sex is the secret to a happy life.
A team of international researchers has carried out a study and found that sex is better for one's happiness than money, the WebMD reported.
"The evidence we see is that money brings some amounts of happiness, but not as much as what economists might have thought. We had to look to psychologists and realise that other things really matter.
"We found it's sex which enters so strongly and positively in happiness equations," according to lead researcher David Blachflower of Dartmouth College.
In fact, the researchers came to the conclusion after analysing data on the self-reported levels of sexual activity and happiness of 16,000 people.
Despite popular opinion, they found that having more money did not mean one gets more sex; there's no difference between the frequency of sex and income level.
But the team found that sex had a greater effect on happiness levels in highly educated, and presumingly wealthier people, than on those with lower educational status.
According to them, overall, the happiest folks are those getting the most sex - married people, who report 30 per cent more between-the-sheets action than single folks.
"Many studies confirm that people who are depressed have less sex. Conversely, if you're not depressed - happy, as some might say -- you're more likely to have more frequent sex," another researcher Robert Hatfield of the University of Cincinnati was quoted as saying.
All religious leaders and even the common people knew it that sex was an important factor for happiness as well as procreation.  That is why they sanctioned sex for the male and female human beings via the institution of sex.  In fact, the common people detest bachelors and spinsters except for people like Christ and some saints because they know that these people are frustrated in sex and may seek sexual relief through adultery which is not thought of as good by the society.
Christ recognised that sex was important for human life.  That is why he mingled with prostitutes frequently.  He was also not very much against adultery because he felt that it was a human need to have satisfactory sex for happiness.  Thus when people wanted his sanction to stone an adulteress, he stated that let a person who had not sinned cast the first stone at her.
Prophet Mohammad also was aware of the need of sex for happiness. The Arabia of his days was not so
civilized and there were frequent wars and so, Prophet
Mohammad Sahib also had to wage many wars against his
enemies who did not agree with his thinking.  Since,
in those days, only men fought the wars and ladies
stayed at home, many men used to lose their lives and
therefore, the number of men was less than the number
of women and people used to marry as many woman as
they wanted.  However, Prophet Mohammad Sahib took a
kind view and restricted the figure of women that a
man could marry to four only.  He did not restrict it
to one as he knew that wars between his followers and
his enemies would continue to be fought and so the
number of men would always be less than the number of
women and therefore, restricting the figure of women
which a man could marry to four, would ensure that at
least every woman would have a husband.
Now polygamy is not disliked by women because then a
woman can at least share a husband with other women
and if the husband is rich, she is pleased with him
because it is much better to share a rich man with
other woman than to have a poor husband. So, women are
not against polygamy.  On the other hand, it is men
who are against polygamy because they may not get a
wife in these days when the populations of men and
women are nearly same.
On the other hand, men are not opposed to polyandry
because they can then at least have a woman though
they have to share her with others.  Polyandry is not
liked by women because then they may not get a
Prophet Mohammad Sahib made marriage a contract
between a man and a woman rather than a bond for the
whole life because he was against prostitution and
knew that his warriors who would be away from their
homes, would have to satisfy their natural urges.  So,
he allowed his warrior followers to have a contract
for a woman in the distant land for a few days but
ensured that if the woman bore the child of the man,
he would be responsible for their maintenance. 
However, it is Hinduism which recognised the role of sex in life more completely. Sex symbols are worshiped in India. There are many temples in India, which display sexual symbols in all their aspects. In fact, our ancestors recognized the role of sex in life and therefore, sex god was worshiped as "Kama Devta" or "Madan" in both North and South India. The worship of "Shiva Linga" is also related to our ancestors' candid views on sex. If we look at the costumes worn by the ladies in Kalidasa's dramas or "Ramayana" or "Mahabharta", we see that the costumes reveal many parts of the body. So sex was not a taboo in olden days. In fact, "Karana" was born to "Kunti" before she had wed "Pandu" and "Dropati" had five husbands.
Our ancestors who were all Hindus recognized the fact that a person who is away from home has also to fulfill his sexual desires to be happy and so they introduced the system of Devdasis and Courtesans where women were offered to the gods or the kings for serving the visitors to a temple or a town. There was also a system of "Nagar Vadhus". There is a mention in Rig Vedas of the institution of prostitution. Some Muslim sects had also started offering girls to 'dargas'. The girl is married to Koran, Nikah is performed, and the girl is called 'bibi'.
The institution of prostitution which is the oldest profession in the world was also recognised by all because it provided outlet to the sexual desires of a man who was not otherwise satisfied.
However, the same sex which can bring happiness, can cause miseries also and finish a man and his family.  The unsafe sex can result in AIDS and STD which finish off a man.  So, while we should indulge in sex for happiness, we should be prudent in our sexual behaviour and use condoms as well as adopt other safeguards.