A first international goal for Andrea Poli after 28 minutes put Italy on their way before a tap-in for Alberto Gilardino on 34 made it 2-0.
A magnificent Andrea Pirlo free-kick on 50 minutes and another close-range effort from Alberto Aquilani 11 minutes from time sealed the win.
Italy travel to the third-placed Czechs knowing a win would put them on 16 points, six points clear of Bulgaria in second spot, and make them favourites to top the group and qualify for Brazil 2014.
It was Italy's first friendly victory for more than 18 months and ended a run of seven straight non-competitive defeats.
They started brightly and after an opening period when they had two goals ruled offside, Poli finished well after racing through from midfield.
Gilardino doubled the lead after following up an Aquilani shot.
Prandelli made four substitutions at half-time and brought on the troubled Mario Balotelli who on Friday had to deny allegations of drug dealing from a mafia informant.
Pirlo put the result beyond doubt when he curled home a trademark free-kick and Balotelli almost scored when his effort grazed an upright.
Aquilani completed the win, tapping home the fourth goal after San Marino keeper Aldo Simoncini fumbled a weak Pirlo free-kick straight to his feet.