Oxford university researchers found that comedians score highly on characteristics that in extreme cases are associated with mental illness.
They also have an "unusual personality structure", with high levels of both introversion and extroversion.
Researchers said the creative elements needed for humour are similar to traits seen in people with psychosis.
Researchers studied 523 comedians (404 men and 119 women) from the UK, US and Australia. The comedians were asked to complete an online questionnaire designed to measure psychotic traits in healthy people.
Also Read
The questionnaire was also completed by 364 actors - another profession used to performing - as a control group, and by a group of 831 people who worked in non-creative areas.
The researchers found that comedians scored significantly higher on all four types of psychotic personality traits than the general group, with particularly high scores for both extroverted and introverted personality traits.
The researchers believe this unusual personality structure may help explain the ability of comedians to entertain.
"The creative elements needed to produce humour are strikingly similar to those characterising the cognitive style of people with psychosis - both schizophrenia and bipolar disorder," said Professor Gordon Claridge, of the University of Oxford's Department of Experimental Psychology.
He said although schizophrenic psychosis itself could be detrimental to humour, in a lesser form it could increase people's ability to associate odd or unusual things or to think "outside the box".
"Comedians tend to be slightly withdrawn, introverted people who may not always want to socialise, and their comedy is almost an outlet for that. It's a kind of self-medication," he said.
The research is published in The British Journal of Psychiatry.