Men have better sex with women who are emotionally unstable, a study has revealed.

And women prefer men who are less agreeable but pay attention to detail, according to the German survey of a thousand people.

We already know that a person’s perception of how compatible they are with their partner makes for a great sex life.

But until now, how someone’s personality influenced another’s sex life had not been widely studied.

Lead researcher Julia Velten and her colleagues interviewed each volunteer about their sex lives, personality and sexual function.

For women, this included sexual desire, satisfaction, arousal and orgasm, and for men, it focused on erectile function, desire, satisfaction and orgasm.

They found “men whose partners had less emotional stability reported better sexual function” while “lower agreeableness of a sexual partner was predictive of better sexual function in women.”

They also discovered that “men who are thorough and dutiful may feel the need to satisfy their partner sexually, which may, in turn, lead to a better sexual function of their partners.”

The study, published in the Journal Of Sex Research, also found that men had better sex with partners who had similar traits — specifically being easily stimulated.

“In men who are easily aroused by erotic fantasies or visual stimuli, having a partner who responds in a similar way may facilitate sexual function,” the researchers said.

The volunteers had an average age of 51 and had been in their current relationships for an average of 24 years.

Personality traits weren’t the only thing rated in terms of sexual function.

Outside of individual traits, men’s age was negatively correlated with their sexual function scores.

Across the couples, relationship duration was not linked to poor sexual function.

“This finding implies that a healthy sexual life is possible even in long relationships,” the researchers said.

But other experts have suggested more research is needed in the field.

“The results only present a static picture of the dynamics between the measured variables — we don’t know how they are causally related to each other,” Dr. Christian Jarrett, who was not involved in the study, wrote for The British Psychological Society.

“Nonetheless, this study breaks new ground by uncovering the ways that our partner’s personality might have an influence on our own sexual function.”