He admitted he feels "nervous" with the illness striking at a crucial time in the season, with less than two weeks to go until Milan-San Remo.
"At least it's better that it happens now than next week," Cavendish told Cycling Weekly.
"It's the first time this year that I feel I'm not ahead of where I want to be. I'm a bit nervous. Before now, I'd be at every race knowing that that I've done the most I can and that I'm in with my best chance of winning. This is the first time that I'm not sure where I'm at. Maybe I'm still good, I don't know."
The Etixx-Quick Step sprinter travelled to South Africa for five days during his busy spring season to take part in the Cape Town Cycle Tour. So far he has had one of the most successful season starts of his career, with wins in the Tour de San Luis, the Dubai Tour (two stages and the overall), the Clasica de Almeria and Kuurne-Brussels-Kuurne.
"Mark Renshaw and one of the young guys with us woke up in the night with stomach cramps and diarrhoea. I thought they had maybe eaten something wrong. They were in bed for a day. Then the next night, I get it and they still had it. So it was not something that we had eaten – it was a virus," Cavendish explained.
"I spent four days on the toilet – stomach virus, diarrhoea, stomach cramps. Last night, [it was better] – the cramps have gone, but it's still not right."
Cavendish used the 5.4-kilometre Tirreno-Adriatico time trial today along the shores of Lido di Camaiore to test his form. He placed 12 seconds behind winner Adriano Malori (Movistar).
"If it was another time of the year, I wouldn't have even started here. I thought I'd go full gas today to see where I'm at. I know my form's there, from how I could sit on [the bike], but the explosivity is lost. I'm just dehydrated," he added.
"I was looking at my power numbers when I was sitting and at pace. My power was all right, but my explosivity wasn't the same. I was expecting that. It'll take me three days to try to get into it and hopefully I can build up by the end of the week."
The Milan-San Remo, Cavendish's early season goal, comes just five days after Tirreno-Adriatico wraps up in San Benedetto del Tronto. The clock is ticking on whether he can rediscover his form in time to repeat his 2009 San Remo victory.
Thank you for reading 20 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1