Move the bed off the beam line
This is the fix tradition recommends first, because it is the only one that removes the problem instead of softening it — and it costs nothing. Stand in the doorway and look up: trace the beam's line across the ceiling, then look at where that line falls on the bed. If it crosses your pillow, your head, or your chest, shift the bed sideways or lengthways until the line misses the bed entirely. In most small rooms, 30 to 60 centimetres is enough, and you can often gain it by swapping the bed to the opposite wall or turning it ninety degrees. Then lie down and check two things: can you still see the door without lifting your head, and is the headboard still against a solid wall? If both are true, you have kept a workable commanding position and solved the beam at the same time. If the bed cannot move because a wardrobe, a radiator, or the room's shape blocks it, skip to fix 2 — do not force a layout that makes the room unusable. A bed that blocks the door is worse than a beam over the foot of it.