When we are at the restaurant is more correct for the waitress to ask '' what are you having madam?'' or ''what will you have?''
They are both correct, but "What will you have, Madam?" is a touch more formal.
If I were the server (or waitress) in a restaurant I would simply ask:
Are you ready to order, madam?
And sir if the customer were a man.
The versions offered by the OP are grammatically correct but I suspect in a more upscale restaurant they might be considered too "friendly" and inopportune.
I would expect a waiter or waitress worth their salt to be a bit more cheerful and imaginative than to ask such a bland question.
'Now is there anything on that menu that tickles your fancy?' or 'What do you feel in the mood for?' or 'What can I tempt you with?', would be just three of an infinite number of ways of speaking to a restaurant customer.