This issue is likely related to
I had my bed at the edge of the world. After I was killed I ended up high in the sky, just outside of the map. When I stepped into the world, I dropped to my death again, and respawned back in the sky.
I found a work-around to get out of this loop. If there is water, or a really high mountain at the edge of your world, you can walk around the map and jump on their.