The scriptures say when a person dies their "spirit" goes back to God. (Not the same as soul as the spirit without a body has no consciousness). But you re-create that body, and put back that "spirit" and it can be conscious again. With all the same memories, including the point of death, so to all intents and purposes it's you, as those memories are unique only to you. The spirit cannot be conscious outside a body. Those who have a heavenly hope have a "invisible spirit body" just like other spirit creatures because flesh and blood cannot survive outside the earth. So that "spirit" that makes us US, can be conscious in either a fleshly body or a spirit body.
Jesus called death "sleep" because of the unconsciousness factor. When you die you (your spirit) is unconscious, when your body is recreated (or you are given a spirit body if going to heaven) your spirit becomes conscious again.