How to get bed coordinates from player?

Is it possible to get the coordinates of the bed the player will respawn at before they actually die? Just curious.

Continue to help post