To satisfy Kali, Iravan cut himself into thirty-two pieces, each marked with a sacred sign, and Yudhishthira offered this flesh to the goddess.
When Iravan was done, only his head and spine remained.
Krishna then spoke to the dead warrior. "Pray to Shesha-Naga, your grandfather, and he will restore your flesh."
Iravan's lips moved in prayer, and Shesha appeared, coiling around Iravan's spine and restoring flesh to his corpse.
Iravan's eyes were still open, and Krishna realized he wanted to watch the war, so they placed Iravan's corpse high in a tree where he could look down upon the battlefield.
Inspired by: Jaya: An Illustrated Retelling of the Mahabharata by Devdutt Pattanaik.
Notes: This story is on p. 248, and I found the details of Iravan's ritual sacrifice in the Wikipedia article as enacted in Tamil terukuttu performances. In some versions it is just Iravan's detached head that watches the war from up in a tree.