I'd love to help with advice regarding restraint gigs but my hands are tied here.
Typo puns aside, You can either flat out mention it, implant the idea into their head that you're working and not just free entertainment (See above for good ways to do so), money tricks to reinforce the idea they should tip, etc.
Most importantly, tips come because people enjoyed the show and appreciate the work you've done. Focus on the magic, maybe do a little suggestion, and let it roll. Have you ever had wait staff ask for a tip? Probably not. I'd also consider mentioning that you're so glad that the restaurant let you do your thing there and that you aren't being paid by them. I'm not sure how, but you can probably figure out how to work it into your patter.
However there will be people that despite how great you do will just cold shoulder you afterwards.