Zombie horses, skeleton horses, zombie nautiluses and camel husks do not prevent the player from sleeping in Java Edition, this is inconsistent with all other monsters and with Bedrock Edition.
Steps to reproduce the issue:
Build a bed, spawn one of the above mentioned mobs, click to sleep
Expected result:
The player should not be able to sleep if they are untamed, with the message “You may not rest now, there are monsters nearby“
Actual result:
Nothing happens, unlike in Bedrock Edition.
They are just passive animals