I was tampering around with the neutral mobs, like the Zombie pigman to see if you could really sleep without it saying: "You cannot sleep because there are monsters nearby".
And it was true, and then I made it angry. It killed me while I slept in a bed though, and then I attempted to recreate the scene... and it pushed me out of bed.
But for some reason, this time I could not leave the bed and I wasn't dead either. To quit, I needed to close the MC launcher.
Zombie pigmen seem to no longer do this, but Players can still sleep next to Zombie pigmen after aggravating them and waiting until they walk a little slower...
Is this a bug? Please let me know what you think;
A crash report was made, while this happened too: