In my company, both cabin and cockpit crew are not allowed to accept tips from passengers; such an attempt will only cause a slightly awkward situation.
If You want to show Your appreciation, a simple Thank You is always well received when You are leaving the aircraft after flight. Also, if someone really goes above and beyond the call of duty, You might write some lines to the company mentioning the crew members name; on most airlines a contact form will be handed out to You on request in flight. This will also be well appreciated by all involved and possibly do the involved crew member more good than a tip.