Throwing an Ender Pearl then going to sleep wakes you up and deals damage, but does not teleport the player. To easily reproduce: throw an ender pearl in the air, and quickly go to bed. You will be waken up and take damage but you won't be tele-ported.
Duplicate of MC-3716 , please use the search function to see if your bug has already been submitted. Currently over 30% of tickets are being closed as duplicate.