There are two basic goals you should have in your thanking your peers here.
Getting them the recognition they want/deserve
While by all means it's "their job" to step in when things go to hell, even on holidays, it's still something they should get an extra nod for. Why things happened isn't important here, only that there was a failure and people stepped up and fixed it.
For me, I would take the time to write up a nice email. Ideally you want this email to reach the respective people and their managers. You may want to make sure it's okay to contact their managers through your manager. The email should be very brief. Simply pointing out who you'd like to thank, that there was an outage and despite being on vacation people stepped up to see it fixed.
Expressing your gratitude
Your code blew up in production, it may have been a mistake, or could have been just what was right then was wrong now, regardless these people could have just ignored the issue and left it as "your problem".
They didn't, they rolled up their sleeves and helped you out. Again arguable that's "their job" but again they could have just not answered the phone, or just said "sorry man, I'm no where near a computer to help" (or other excuse)
So you feel both thankful and guilty they had to work during their vacation. You should contact them as individually as practical to give them a personal thank you. If we're talking a dozen or so people contacting them individually would be best, if we're talking like fifty you're probably better off thanking them based on team, etc.
I wouldn't apologize per se, we all make mistakes, but do make a point to thank them for helping you out with the issue despite being on vacation and that you truly appreciate it.