Bhagavad Gita
8.12

सर्वद्वाराणि संयम्य मनो हृदि निरुध्य च । मूर्ध्न्याधायात्मनः प्राणमास्थितो योगधारणाम् ॥

sarvadvārāṇi saṃyamya mano hṛdi nirudhya ca | mūrdhnyādhāyātmanaḥ prāṇamāsthito yogadhāraṇām ||

Translation

Having controlled all the gates (of the body), having confined the mind in the heart, having fixed the vital breath in the head — established in the concentration of yoga —

Interpretation

This verse (completing in 8.13) describes the yogic technique for the moment of departure. Sarva-dvarani samyamya — all the nine gates of the body (openings) are controlled (sense withdrawal). Mano hridi nirudhya — the mind is withdrawn and confined to the heart (the seat of consciousness in the yogic anatomy). Murdhny adhaya pranaṃ — the vital breath is raised to the crown of the head (sahasrara — the highest center). This upward movement of prana at death, guided by the trained mind, determines the quality of the exit from the body.