The bed is a cue
Whatever usually happens in bed is what the bed comes to mean. Stimulus control, one of the oldest behavioural findings about insomnia, in plain terms.
Whatever mostly happens in a bed is what that bed comes to mean.
This is among the oldest behavioural findings in the field and the least fashionable, because the advice sounds like nothing at all.
A bed is a learned signal. If the reliable experience of getting into one is falling asleep, it becomes a cue for falling asleep. If the reliable experience is lying there awake, running the day back, doing arithmetic about the hours remaining, it becomes a cue for that instead. The association forms without asking permission.
The bed does not know what you intend. It only knows what usually happens.
The counter-move, stimulus control, is unglamorous: when lying there has clearly stopped being restful and turned into struggling, get up, go somewhere dim, do something undemanding, and come back when sleepy. It works by refusing to let the bed accumulate the wrong meaning.
Watching the clock to decide when that moment has arrived defeats the point. The judgement is whether it has stopped being restful, not what the number says.
A story running in the dark is a middle path — it occupies the time without turning it into a task. But when a night has properly turned, the change of room is the thing with the evidence behind it.
The longer answer
Stimulus control is one of the three things how to fall asleep fast says the research supports: if lying awake turns into a struggle, get up until you are sleepy. What to do when you can’t sleep gives the steps — roughly 15 to 20 minutes, guessed rather than timed, then up, a low light and something dull, and back when you feel sleepy.