understand the body without the "spirit" is dead. so lets understand "sleep" here. example, I know it's crude, but it's the best example I can give that people can releate to.
A. when we die natually, our bodies return to earth from where it came...
B. the "spirit" return to God, who gave it. now is God only in Heaven? no, listen, Jeremiah 23:23 "Am I a God at hand, saith the LORD, and not a God afar off?" Jeremiah 23:24 "Can any hide himself in secret places that I shall not see him? saith the LORD.
Do not I fill heaven and earth? saith the LORD."
now, knowing this, our spirits hold the informatation, that is contained in what we refer to as the soul. this informatation is the source that restore the soul, when it enter a body... (remember the spirit can be RENEWED, rebooted), in this case, in our resurrected bodies. listen to my example so you may understand.
Example the Cpmputer: Think of our "spirit" as the ROM memory in a computer, and our "souls" as the RAM memory. when God in Natural Life "BLOW"/the electricity is turned on, our computers/mind, the ROM give the basic instruction to come alive.... the RAM, while "alive", or becoming alive, acess or carry out the day to day instructions, or operatations.
but when the the breath/the electricity, is turned off, what happens? the "soul"/Ram vanish, or is inactive as we say the computer is asleep, or not active, or .... we, DEAD, natually in reference to the soul, unconscious, or in a state of sleep, or inactivity. but when the the electricity/breath is turned back on, the computer appears to ... "COME ALIVE". and remember God is our HARD DRIVE, (and it's cloud base...

), and on, it is all, and has everything we have done in our Natural lives.
so our new bodies come from GOD, supportive scripture, 1 Corinthians 15:35 "But some man will say, How are the dead raised up? and with
what body do they come?" 1 Corinthians 15:36 "Thou fool, that which thou sowest is not quickened, except it die:" 1 Corinthians 15:37 "And that which thou sowest, thou sowest
not that body that shall be, but bare grain, it may chance of wheat, or of some other grain:" 1 Corinthians 15:38 "
But God giveth it a body as it hath pleased him, and to every seed his own body." BINGO.
now as for the "soul", Ezekiel 18:4 "
Behold, all souls are mine; as the soul of the father, so also the soul of the son is mine: the soul that sinneth, it shall die." EVERYTHING WE HAVE DONE IN THIS BODY GOD HAVE A RECORD OF IT ON THE CLOUD...

.. FOR HE knows everything. THIS IS WHY HE CAN "WIPE" AWAY ALL TEARS, for what's on the hard drive he can wipe clean, or is necessary and the "Soul"/Ram memory can acess NEW INFORMATION.
hope this example can help you understand what happens at death.
PICJAG, 101g.