The Swiss only decided to play after his morning practice session, carrying a few aches and pains following his Madrid Masters title win last weekend.
Adjusting from the slippery blue clay to the far slower red clay of the Foro Italico with ease, Federer conceded he had been unsure what to do up to the very last minute.
"I wanted to see how I felt and make sure that I didn't have anything major because we're ahead of a long summer," he said.
"If this was the last tournament of the season it would be no problem. But as this is the beginning of many tournaments in a row, potentially a lot of five-setters in a row, I need to make sure I make good decisions, so I go round by round.
"I'm happy that I felt okay out there today."
A good performance this week from Federer, who now plays former world number one Juan Carlos Ferrero, would help him to close the gap on Novak Djokovic in top spot.
"I might be world number three again next week but that doesn't matter for Rafa (the number three) and myself," he said.
"It's interesting times right now and I know there's going to be a lot of talk about the rankings.
"What I know is that I'll have a shot until the U.S. Open, whatever shape or form with the rankings, and we'll see how it's going to play. Right now I'm just happy I'm healthy."