'Perfectionism' bowel pain link
In this study, each person was checked three and six months after their initial bout of bacterial gastroenteritis to see if they had developed IBS symptoms such as diarrhoea, constipation, abdominal pain and bloating.
In all, 49 people had IBS at both points. Women were more than twice as likely to have IBS as the men.
Those with IBS were significantly more likely to have reported high levels of stress and anxiety and psychosomatic symptoms than those who did not develop the condition.
They were also significantly more likely to be "driven", carrying on regardless until they were forced to rest, which the researchers say simply makes the initial condition worse and longer-lasting, potentially leading to IBS.
Dr Rona Moss-Morris, who led the research, said: "We found people's beliefs about their symptoms, how anxious they got and their behaviour were all important.
"These people were not hypochondriacs. But they did have a negative attitude towards their symptoms."
She added: "These are people who have high expectations of always doing the right thing - and going off work goes against their beliefs."
Such people try to remain active and may go back to work too soon, she said.
"They keep going - but then collapse in a heap.
"They are 'all or nothing' people who have high expectations of themselves."
Dr Moss-Morris said people who appear to have problems recovering from a bout of gastroenteritis could be investigated to see if they have a particularly anxious or perfectionist personality.
She suggested cognitive behavioural therapy might be an effective treatment.
But she added there was no suggestion that IBS was "all in the mind".
Professor Robin Spiller, an IBS expert from University Hospitals Nottingham and the editor of Gut, said: "There is probably a complicated mechanism at work here."
He said there were two potential explanations.
"It might be that stress and anxiety affects the immune system.
"But it could also be that if you don't rest, it might do you more harm."