Well i found out a grumpy fact that if you sleep on your bed INDOORS, there is a chance of a zombie/skeleton mob attacking you while you are sleeping. This is due to putting the bed too near the outer wall of the house. I hope the photo below will help you lol (cuz i kept on being attacked when sleeping )