In the future, if something like that flies out of your mouth because you're half-asleep/tired/caught off guard... simply say something like: "Sorry. That didn't come out right/not really how I feel/not what I meant to say"
Don't bend over backwards apologizing for saying something less than perfect in response to her poke. It puts you in the one-down position again.
Why are YOU spending all this energy apologizing to HER?
Say "sorry" once. Then change the subject.
Don't worry, you'll get better at not taking the bait. And your W sounds like one who is going to keep dangling the bait in front of you, hoping you'll take it.
By "Bait', I mean pushing your buttons to get you to say or do something that will either: 1. Make you look like the bad guy she is perfectly justified in leaving (as this scenario proves) 2. Make sure you're still dangling at the end of the line in case she decides to change her mind.
You played right into scenario #1 here. She was the one who made the snarky (?) comment first.
If you are not working and she might have a point, just try and validate. "I know it's hard to have that responsibility." End of discussion.