"You may not rest now, there are monsters nearby" When there are no monsters nearby
My bed is 10 blocks high, I've gone on spectator mode to check for mobs and there's none closer than like 8 blocks. Does anybody know what's up? Thanks.
Welcome to StackExchange / Arqade :)
The Minecraft wiki states this, which I suspect you've seen:
If a "monster" is within 8 blocks of the bed horizontally (in the X- and Z-axis), and 5 blocks vertically (in the Y-axis), the message "You may not rest now, there are monsters nearby" appears and the player is prevented from sleeping until the monsters leave or are killed. Most hostile mobs, as well as some neutral mobs prevent players from sleeping, as shown in the table below.
https://minecraft.gamepedia.com/Bed#Sleeping
However as you pointed out, there were no mobs within 8 blocks.
Possibly, the game has been modified in some way? If you are playing on a server, most likely they are using a non-vanilla server like PaperMC. It's possible that this implements the logic differently.