Outside the walls they stand, & at crossroads. At door posts they stand, returning to their old homes. But when a meal with plentiful food & drink is served, no one remembers them: Such is the kamma of living beings.
Thus those who feel sympathy for their dead relatives give timely donations of proper food & drink — exquisite, clean — [thinking:] "May this be for our relatives. May our relatives be happy!"
And those who have gathered there, the assembled shades of the relatives, with appreciation give their blessing for the plentiful food & drink: "May our relatives live long because of whom we have gained [this gift]. We have been honored, and the donors are not without reward!"
For there [in their realm] there's no farming, no herding of cattle, no commerce, no trading with money. They live on what is given here, hungry shades whose time here is done.
As water raining on a hill flows down to the valley, even so does what is given here benefit the dead. As rivers full of water fill the ocean full, even so does what is given here benefit the dead.
"He gave to me, she acted on my behalf, they were my relatives, companions, friends": Offerings should be given for the dead when one reflects thus on things done in the past. For no weeping, no sorrowing no other lamentation benefits the dead whose relatives persist in that way. But when this offering is given, well-placed in the Sangha, it works for their long-term benefit and they profit immediately.
In this way the proper duty to relatives has been shown, great honor has been done to the dead, and monks have been given strength:
The merit you've acquired isn't small.
Sadhu!
****************************************************************************
According to the Theravada traditions:
For the non-Arahant, death is a time of transitioning to a yet another rebirth; thus, the living participate in acts that transfer merit to the departed, either providing for a more auspicious rebirth or for the relief of suffering in the departed's new existence. For the living, ceremonies marking another's death is a reminder of life's impermanence, a fundamental aspect of the Buddha's teaching.
In Sri Lanka, funeral customs include:
"Offering of cloth on behalf of the dead" (mataka-vastra-puja):
Prior to a cremation, at the deceased's home or cemetery, the funeral's presiding monastics are offered a white cloth to be subsequently stitched into monastic robes. During this ceremony, the following verse is recited:
Impermanent alas are formations,
subject to rise and fall.
Having arisen, they cease;
their subsiding is bliss.
Aniccā vata saṅkhārā,
uppādavayadhammino.
Upapajjitvā nirujjhanti
tesaṃ vupasamo sukho.
In addition, as relatives pour water from a vessel to an overflowing cup, the following verses are recited:
As water raining on a hill
flows down to the valley,
even so does what is given here
benefit the dead.
Unname udakaṃ vaṭṭhaṃ yathā
ninnaṃ pavattati
evameva ito dinnaṃ
petānaṃ upakappati.
As rivers full of water
fill the ocean full,
even so does what is given here
benefit the dead.
Yathā vārivahā pūrā
paripūrenti sāgaraṃ
Evameva ito dinnaṃ
petānaṃ upakappati.
"Preaching for the benefit of the dead" (mataka-bana):
Within a week after the funeral (usually on the third day after), a monastic returns to the deceased's home to provide an appropriate hour-long sermon for surviving relatives and neighbors.
"Offering in the name of the dead" (mataka-dana):
Made three weeks after the funeral and then annually afterwards, the deceased's survivors hold an almsgiving on their behalf.