Srimad Bhagavatam Canto 04, Chapter 29, Text 61

SB 4.29.61

sayanam imam utsrjya
 svasantam puruso yatha
karmatmany ahitam bhunkte
 tadrsenetarena va
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
The living entity, while dreaming, gives up the actual living body. Through the activities of his mind and intelligence, he acts in another body, either as a god or a dog. After giving up this gross body, the living entity enters either an animal body or a demigod’s body on this planet or on another planet. He thus enjoys the results of the actions of his past life.
Purport by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
Although the root of distress and happiness is the mind, intelligence and ego, a gross body is still required as an instrument for enjoyment. The gross body may change, but the subtle body continues to act. Unless the living entity gets another gross body, he will have to continue in a subtle body, or a ghostly body. One becomes a ghost when the subtle body acts without the help of the instrumental gross body. As stated in this verse, sayanam imam utsrjya svasantam. The gross body may lie on a bed and rest, and even though the machinery of the gross body is working, the living entity may leave, go into a dream, and return to the gross body. When he returns to the body, he forgets his dream. Similarly, when the living entity takes on another gross body, he forgets the present gross body. The conclusion is that the subtle body — mind, intelligence and ego — creates an atmosphere with desires and ambitions that the living entity enjoys in the subtle body. Actually the living entity is in the subtle body, even though the gross body apparently changes and even though he inhabits the gross body on various planets. All the activities performed by the living entity in the subtle body are called illusory because they are not permanent. Liberation means getting out of the clutches of the subtle body. Liberation from the gross body simply involves the transmigration of the soul from one gross body to another. When the mind is educated in Krsna consciousness, or higher consciousness in the mode of goodness, one is transferred either to the upper, heavenly planets or to the spiritual world, the Vaikuntha planets. One therefore has to change his consciousness by cultivating knowledge received from Vedic instructions from the Supreme Personality of Godhead through the disciplic succession. If we train the subtle body in this life by always thinking about Krsna, we will transfer to Krsnaloka after leaving the gross body. This is confirmed by the Supreme Personality of Godhead:
janma karma ca me divyam
 evam yo vetti tattvatah
tyaktva deham punar janma
 naiti mam eti so ’rjuna
“One who knows the transcendental nature of My appearance and activities does not, upon leaving the body, take his birth again in this material world, but attains My eternal abode, O Arjuna.” (Bg. 4.9)
Thus the change of the gross body is not very important, but the change of the subtle body is important. The Krsna consciousness movement is educating people to enlighten the subtle body. The perfect example in this regard is Ambarisa Maharaja, who always engaged his mind on the lotus feet of Lord Krsna (sa vai manah krsna-padaravindayoh). Similarly, in this life we should always fix our mind on the lotus feet of Krsna, who is present in His arca-vigraha, the incarnation of the Deity in the temple. We should also always engage in His worship. If we engage our speech in describing the activities of the Lord and our ears in hearing about His pastimes, and if we follow the regulative principles to keep the mind intact for advancing in Krsna consciousness, we shall certainly be elevated to the spiritual platform. Then at the time of death the mind, intelligence and ego will no longer be materially contaminated. The living entity is present, and the mind, intelligence and ego are also present. When the mind, intelligence and ego are purified, all the active senses of the living entity become spiritual. Thus the living entity attains his sac-cid-ananda form. The Supreme Lord is always in His sac-cid-ananda form, but the living entity, although part and parcel of the Lord, becomes materially contaminated when he desires to come to the material world for material enjoyment. The prescription for returning home, back to Godhead, is given by the Lord Himself in Bhagavad-gita (9.34):
man-mana bhava mad-bhakto
 mad-yaji mam namaskuru
mam evaisyasi yuktvaivam
 atmanam mat-parayanah
“Always think of Me and become My devotee. Worship Me and offer your homage unto Me. Being completely absorbed in Me, surely you will come to Me.”
Srimad Bhagavatam Canto 04, Chapter 29, Text 60
Srimad Bhagavatam Canto 04, Chapter 29, Text 62