They requested Socrates to lie down and take it easy. Socrates told them that he did not want to miss the
He wanted to be awake and aware as far
as possible. He kept describing his feelings until his speech gave up.
So being aware is one key to the art of dying.
The other part is what Krishna has touched in Gita as
Antkaale ca maameva smaranmuktvaa kalevaram
Yah. prayaati sa madbhaavam^ yaati naastyatra sam^s'ayah.
yam^ yam^ vaapi smaranbhaavam^ tyajatyante kalevaram
tam^ tamevaiti kaunteya sadaa tadbhaavabhaavitah. (8..6)