It most likely was you having a dream and the dream might've made you think you heard this, as it has happened to me (and most likely others) where I have been awoken by a voice/figure but it actually being the dream I was having making itself appear as a real-life voice/figure speakng to me.
You can cleanse the area that you sleep in (or even your home) if you feel that there are negative energies surrounding. There are many ways to cleanse a space if you'd like me to recommend you to some articles on it.
If you want you can sleep in a diffrerent space, if you don't feel comfortable in your current sleeping arrangement.
Thank you, it's nice to hear someone else's opinion on this matter. I will be working on cleansing my room now because I do think it might be something negative, this way nothing similar to it will happen again.