Everyday it happens. To all of us. I wake up the same way like every person on this planet does each day. Within seconds of awaking from a deep dark unconscious state, I open my eyes and I am myself ,and, you are yourself! To me this is one of the seminal mysteries of both philosophy and psychology and yet how rarely it is ever discussed by academics in these fields.
It's strange that there isn't some type of medical condition in existence, where people wake up as someone or something other than themselves. Perhaps even worse would be a condition where people awoke only to the state of being a conscious entity everyday, that, only possessed an indeterminable and vague sense of self identity. Obviously, if this was the case, human life would never have developed beyond the stage of simply fulfilling its basic desires on a day-to-day basis. We would have been essentially lower down the natural order than most animals, as lacking any tangible persistent and durable sense of self-identity we couldn't have formed relationships, families or eventually fully fledged societies.
So what gives us all this unique first person sense of self that we can identity as being me, rather than you each morning. Psychologists would say that it's our EGO that produces this sense, but, we all know that even domestic animals, and even wild garden birds that we observe each day, appear to be possessed of this sense of self identity too. Linguistically inclined philosophers would say it's because of our sense of I that we derive from our public language that we learn as children, and the I is produced because it is other than everything else in the world that language can name and identity. However, this doesn't explain why some types of animals have it too, and, why human beings who are born deaf and dumb have an identifiable sense of self from an early age, and, the case with babies is even more evident, considering babies cannot develop this "I sense" until their language skills develop later.
In the final analysis the important question revolves around what allows each and every one of us to be Mr X and Ms Y each morning after a profound lapse into an unconscious state. The answer to this question may mean that we have to ask ourselves where our unitary sense of self goes each and every night when we're sleeping, and perhaps this is more of a metaphysical rather than a scientific question.