the chunk that you are in is the only chunk that is rendered during sleeping.
Also, i am running into somelightinh issues where the torch only light updates the stuff in the chunk, until you walk into that chunk. Thenit updates
I have a suspicion that the bed glitch could be related to this lighting glitch