It looks like the position you were when you clicked on the bed. Since it's the same position you get when you go out of the bed, I guess MC is only rotating the view position, not the server head position.
Apparently from 1.7 to 1.8 it got changed that you now don't see your own character in bed. In 1.7 it often had held tools sticking in or through its own body, that probably had the same reason. I've included a 1.7.10 screenshot.
Related issues
Attachments
Comments


Does this also happen in spectator mode, like it happens for particles in MC-46445?

How should I sleep in spectator mode? Or do you mean I should spectate another account that's sleeping?

Ah, ok. I didn't test sounds and so on, but I can do that now.

Yes, the sounds are also the other way around while sleeping when I go to bed standing on the red end. It's easy to test with subtitles. Is going to bed programmed like spectating entities? Interesting.