If entering a bed while the player is in a minecart (on and off rails), boat (in and out of water) or horse, the player will fall out of bed in the direction of the entity.
Whether you fall out or not, is based on the position of the mount from the bed and if there are blocks to fall on to.
This is not a visual bug.
As placing fire on the block you fall on to, will put you fire and kick you from the bed.
Video demonstrating the issue: BedBug.mp4