It is somewhat awkward, virtually no one is trained for situations like that. Also, the person saying, "thank you for coming," is feeling awkward, too. The best thing to do, in my opinion, is just to smile and nod. Hugs, if you're close enough.
Funerals are for the living, not the dead. Do what you can to make the survivors feel good.