Reyes doubled to lead off the 10th against Brad Brach (0-2) and Carlos Lee was intentionally walked to set up a double play.
But Ruggiano scalded a grounder past diving San Diego third baseman Chase Headley and Reyes scored easily as Miami took the rubber match of a three-game series.
The decisive hit made a winner of Ryan Webb (4-2), who held the Padres scoreless in the top of the 10th despite issuing a pair of walks.
Donnie Murphy chipped in with a two-run triple for Miami.
The Marlins had a 4-2 lead in the eighth but Yonder Alonso forced extra innings when he cranked a two-run homer off Edward Mujica.
Padres starter Clayton Richard held Miami to two runs over 5 1/3 frames and added a sacrifice fly in the loss.
Interpol investigating stolen passports on missing flight
Susan Sarandon 'very excited' about daughter's pregnancy