Small electronic devices known as stim plugs served the purpose of rousing or resuscitating patients. Medical droids employed them as a common piece of equipment. It's probable that they utilized a minor electrical shock, alongside a stimulant injection, to bring patients back to consciousness.
A curious detail is that the stim plug utilized to revive Anakin Skywalker in the "Downfall of a Droid" episode was applied to his mechanical limb. Given that the device received its description and designation solely within the Decoded commentary accompanying the episode, the original intent of the animators remains ambiguous; specifically, whether it was meant to influence his organic or prosthetic components.