Within how many blocks does a monster have to be close to my bed to trigger the warning?
Sometimes when I want to sleep within my house, I can't because of the "You may not sleep now, there are monsters nearby" warning. Within how many blocks does a hostile mob have to be to my bed to trigger this warning?
Solution 1:
http://www.minecraftwiki.net/wiki/Bed#Sleep_interruption
The system is much simpler since the full release — sleep is not allowed within 10 blocks of a hostile mob.
Quoted from the minecraft wiki. Hope this helps.
Solution 2:
If a hostile mob is in the ten block radius you will not be allowed to sleep.