Yeah, you can't hand over your dining credits like you would an unused Fastpass. If it were the day you were leaving, I'd suppose you can hand someone over your room key, and any unused credits would still be on there, but if there's even a slim chance your room key also still has charge privileges...best not to consider it.
So like Master Yoda said, once in a restaurant, you can always elect to tell your waiter you'd like to cover someone else's meal as well.
Not to s**t on you potential good deed, but I think I'd rather use those extra credits on either Signature Dining, Hoop De Doo/Poly Luau, or Room Service (if you have it at your resort). After that, maybe use leftover credits for takeout meals & snacks you might be able to eat on the way home.