When men spend the night in the same bed with someone else their sleep patterns are disturbed, even if they do not have sex. This leads to poorer performance in intelligence tests the next day.
Women, too, get disturbed sleep if they share a bed, but their mental ability is not affected.