Bed Patch is a small server mod that fixes a long-standing vanilla bug where players get stuck in bed after teleporting or changing dimensions and have to quit the game. It runs on Forge for Minecraft 1.10.2 - 1.12.2.
Instead of a workaround, it patches the actual cause. As a coremod it may conflict with other mods; Cubic Chunks is a known incompatibility. 🛏️
Only the server needs it, so Minecraft hosting with a one-click panel install is all it takes to stop the bed glitch.