When you see yourself sleeping, it means you were projecting. Most people do it. It's called an out of body experience when you do it subconsciously. Purposely, it is called astral travel.
A spirit was obviously conversing with you. If you learn how to lucid dream, you will be able to remember and possibly even control such experiences when they occur. Many people use their sleeping state to interact and communicate with the spirit world. Just be sure to have your bedroom protected, your bed, or yourself. Right now, the situation poses no threat, but one day you may get yourself into trouble, and you want to have all your bases covered.