The reason I said "I hope you sleep well." was because she's had trouble sleeping lately. I don't think there's anything wrong with expressing compassion.
There isn't anything wrong with it. In fact, I would have said the same thing. No point in snapping back at her, right?
It's hard to deal with someone who's bitter. So your response was approrpriate. I am guessing she had nothing to say to that?