The Issue:
The "Stuck In Bed" bug is an issue that has existed in vanilla Minecraft since at least version 1.10.2. The primary symptom of the issue is that after teleporting a player may not be able to leave their bed the next time they sleep. The only vanilla way to deal with the issue when it happens is to exit the game. Some mods, like "Bed Bugs", have given players a better way to deal with the issue by allowing them to kick themselves back to the main menu when the issue happens, saving the player the time it takes to reload Minecraft which is particularly important with larger modpacks that may take a while to load. Unfortunately, due to mod interactions and other factors this sometimes causes the game to crash anyway.
The Cause:
When Minecraft decides a player should wake up it looks them up in the EntityTracker and sends them a signal that tells them to get out of bed. If a player can not be looked up in the EntityTracker, they will never get the signal that tells them to get out of bed.
The Ent