Ambrose Bierce said this quote

Epitaph n: an inscription on a tomb showing that virtues acquired by death have a retroactive effect.