World number two Swiatek came to Italy on the back of a demoralising straight-sets defeat to Coco Gauff in the semi-finals of the Madrid Open.
But the 23-year-old Pole dropped just a single game in winning 6-1, 6-0 against Italian Cocciaretto to move onto a third-round meeting with either American Danielle Collins or Elena-Gabriela Ruse of Romania.
"I felt like the ball was kind of listening to me today and I had full control over the match, so it's always pretty comfortable to play a match like that," Swiatek said.
"You just need to continue the work you've been doing and not expect that it's going to happen more often."
Swiatek is a three-time winner of the Italian Open and is using the claycourt tournament as a key step towards her defence of her French Open title, but she is yet to win a tournament this season.
In another second-round match, former world number one Naomi Osaka came from behind to overcome lucky loser Viktorija Golubic 2-6, 7-5, 6-1.
Sixth seed Jasmine Paolini, cheered on by her home crowd, was a comfortable 6-4, 6-3 winner against Lulu Sun of New Zealand and will face Ons Jabeur in round three after the Tunisian benefited from a walkover against Petra Kvitova.
Men's world number one Jannik Sinner will make his return to competition after a three-month doping ban by facing Mariano Navone on Saturday after the Argentinian beat Federico Cina 6-3, 6-3 on Thursday.