Sharapova, a former two-time winner in Rome, announced her decision to pull out prior to her scheduled semi-final meeting with Italian seventh seed Sara Errani on Friday.
Sharapova wrote on her Twitter feed: "I'm sorry for having to withdraw from the tournament this morning. Didn't recover after being sick last week and it got me again last night [Thursday]."
Sharapova had come into the tournament in good form after reaching the final in Madrid last week, and showed no ill effects in beating American Sloane Stephens 6-2 6-1 in the third round on Thursday.
Sharapova is set to begin the defence of her French Open title in 10 days' time. She ended a four-year wait for her fourth career grand slam title in Paris last year, coincidentally by beating Errani in the final.