If there are no blocks next to a bed, the player will always wake up on top of that bed after he slept in it.
Minecraft 19w12b 2019-03-21 21_55_49.mp4
MC-146490 spawn points don't work
MC-146527 Awakening and Spawning Problems
MC-146593 Bed supposedly removed or inaccessible
MC-146360 Exiting bed always puts the player or villager in blocks
MC-146381 Sleeping in a bed always resets the player's spawn point to the world spawn point