When a bed has blocks above it the character performs the swimming animation while attempting to sleep.
Related issues
Attachments
Comments

[media][media][media]

Confirmed, but not in the way it appears in the description.
A player will keep the swimming animation should they go to bed while swimming, but only if the bed is submerged. Should the water around it be removed, the player reverts to the standard model.
But hey, it creates some cool slumber poses:
[media]