Leave a big tip.
I mean, sure, you were polite enough, but that thing you just said would qualify as sexual harassment in a normal workplace. Would you talk to your boss like that? Or your secretary? I know you didn't mean it that way, and no offense was taken by the waitress. But don't you think it's weird that you could be prosecuted in a court of law for that comment, provided this were a normal workplace?
Your waitress' sole responsibility in your evening is to transport your drinks/food from bar/kitchen to your table. She is not responsible for not taking your comment the wrong way or not getting weirded out or offended by your suddenly outgoing nature. And because she is a kind-hearted, patient person, she will hold none of it against you next time you come into the restaurant. She will bring you your patatas bravas and glass of vino and smile and say 'Nice to see you!' and actually mean it. She will pretend what you just said never happened.
The least you can do is leave a big tip. Like, bigger than 20% big. Why? Because there aren't many people in the world who will do that. Most people in this world are obsessed with holding each other accountable, with placing blame, and with being right. Tonight, she let you say whatever stupid shit you felt like saying, and never said boo. And she will not judge you for it in the end. Because for the most part, you're a nice guy.
And that suspension of judgment is worth much, much more than 20% of your dinner tab.