The #60 Acura ARX-05 was second for the restart after the fourth full-course caution of the race, which came early in the seventh hour when the LMP2 class-leading #11 TDS Racing ORECA of Steven Thomas picked up damage in an incident at the Bus Stop chicane.
Castroneves lined up alongside the #31 Action Express Racing Cadillac of Pipo Derani when the race went back to green, but locked his rears and spun as he looked for a move on his fellow countryman, dropping the #60 car down the order - but crucially still on the lead lap.
"It locks the rears so unexpected, I wasn't trying to do anything different," said Castroneves. "I'm not sure what happened, it really caught me out with that spin. Thank God we kept on the lead lap and we just need to keep going."
Derani led until pitting to hand over to Jack Aitken just shy of 9pm local time, and Aitken continued to hold the advantage after the subsequent pit cycle. But in the next stint it was Alex Lynn on the move aboard the #02 Ganassi Cadillac.
Lynn dispatched both Brendon Hartley in the #10 Wayne Taylor Racing Acura and then Aitken to take the lead around the eight-hour mark, before pitting shortly after to hand over to Richard Westbrook.
The order was shuffled once again by the fifth full-course caution of the race, caused by a loose tyre stack, with the #01 Ganassi car of Renger van der Zande cycling to the front by virtue of not stopping.
At the restart just before the nine-hour mark, van der Zande led from Aitken in the AXR Cadillac, while Westbrook was shuffled back to fifth behind Mathieu Jaminet's #6 Porsche 963 and a recovering Tom Blomqvist in the MSR Acura.
Ricky Taylor, who had taken over the WTR Acura from Hartley, was the final car on the lead lap in sixth, with Philipp Eng circulating a lap down in the best of the BMW M Hybrid V8s in seventh place.
In LMP2, the PR1/Mathiasen Motorsport ORECA was the prime beneficiary of the #11 TDS Racing car's woes, with Alex Quinn leading the way after taking over from Ben Keating.
The #35 TDS car of Josh Pierson ran second ahead of Gianmaria Bruni in the #55 Proton Competition machine.
Sean Creech Motorsport led the way in LMP3 with Nico Pino at the wheel of the team's #33 Ligier ahead of the #87 FastMD Racing Duqueine of Nick Boulle.
Andretti Autosport driver Rasmus Lindh picked up a penalty for tipping the Era Motorsport LMP2 car of Dwight Merriman into a spin.
Jack Hawksworth grabbed the lead in GT Daytona Pro at the restart aboard the #14 Vasser Sullivan Lexus RC F GT3 ahead of the #79 WeatherTech Racing Mercedes-AMG GT3 driven by Dani Juncadella.
Corvette Racing's solo C8.R was third with Antonio Garcia at the wheel ahead of Alex Riberas in the #23 Heart of Racing Aston Martin Vantage GT3, which led for a spell before dropping back during the most recent round of stops.
Kyle Marcelli led the way in GTD in the #93 Racers Edge Acura NSX GT3 ahead of the #57 Winward Racing Mercedes of Philip Ellis.