Sounds like you followed one of the many important firearm rules. "never fire unless you are sure of your target" This is just a great example as to why it was pounded into our heads at hunting safety class.
I could never sleep with a gun right next to me, when I was a kid I would routinely sleep walk and have HORABLE night mares that played out while I walked around the house in a half daze. Once woken I could remember everything, was almost like I was in a trance. Sometimes I will sit up and be in a dream but I do not seem to walk anymore, just sit there talking, looking crazy to my wife lol
There have been a few times I have woken in the night and checked my house out. Not haveing a irearm avaliable at the time I grabed the next best thing, a very large knife that is kept in my room.