When a player is riding a nautilus, is submerged in water, and right clicks to sleep on a bed, the player will be able to sleep but will not be teleported onto the bed as normal and instead lie down where they were on the nautilus and dismount it. As shown in the screenshot, this allows a player to sleep while underwater.
26.1-snapshot 2 still have this bug