The instinctive response to not sleeping is to stay in bed, on the basis that resting is better than nothing and sleep may still arrive. It is one of the most reliable ways of converting a temporary problem into a chronic one.
The bed becomes a cue
Associations form through repetition. If you consistently sleep when you get into bed, the bed becomes a cue for sleepiness, and most people experience that as feeling drowsy shortly after lying down.
If you consistently lie awake frustrated, worrying and clock-watching, the bed becomes a cue for alertness and anxiety instead.
People with chronic insomnia frequently describe being exhausted on the sofa and wide awake the moment they get into bed. That is the association working exactly as associations do.
Why trying harder fails
Sleep is not a voluntary action. It cannot be performed on demand, and effort is actively counterproductive.
Trying to sleep involves monitoring whether it is working, and monitoring requires wakefulness. This is sometimes called sleep effort, and reducing it is a specific target in treatment.
The paradox is that caring less about sleeping is what allows it to happen, which is difficult advice to follow when you have work in the morning.
Clock watching
Checking the time does several unhelpful things at once. It provides a number to calculate against, producing arithmetic about how little sleep remains.
That calculation generates anxiety, which raises arousal, which prevents sleep further. It also produces light exposure and physical movement.
Turning the clock away, or putting the phone out of reach, removes a considerable amount of night-time arithmetic.
Time in bed is not rest
The belief that lying awake is at least restful is understandable and not well supported.
Lying awake anxious is not restorative, and extended time in bed reduces sleep pressure, making the following night lighter and more fragmented.
It also dilutes sleep across a longer window, so the same amount of sleep becomes more broken.
The twenty minute guideline
The standard recommendation is to get up if you have been awake for around twenty minutes and are not settling.
Do not check the clock to measure this; use your sense of how long it has been. The point is not precision but avoiding extended wakefulness in bed.
What to do once up
Go to another room if possible. Keep lighting low. Do something undemanding and mildly absorbing: reading something unchallenging, listening to something quiet.
Avoid screens where possible, avoid anything stimulating or emotionally engaging, and avoid work.
Return to bed when you feel sleepy rather than after a set period. If you are awake again twenty minutes later, get up again.
Why this feels wrong
Getting up at three in the morning when exhausted feels like the opposite of what you need, and the first few nights are genuinely harder.
What it achieves is breaking the association, and most people notice a difference within one to two weeks.
The fixed waking time
Whatever happens overnight, get up at the same time. Lying in to compensate feels reasonable and undermines the following night by reducing sleep pressure and shifting the body clock.
This is the single most useful habit in sleep, and it matters more than bedtime.
What about resting rather than sleeping
People frequently ask whether lying quietly counts for something, and the honest answer is that it counts for very little compared with what it costs.
Quiet wakefulness provides minimal physiological restoration, and the cost is the conditioning: every hour spent awake in bed strengthens the association you are trying to break. Resting elsewhere, and returning when sleepy, achieves the rest without the damage.
Where worry belongs
If the problem is a mind that will not stop, writing things down before bed rather than in bed removes some of the job the mind is doing.
Deciding to consider something tomorrow, and noting one line to hold it, works better than attempting to resolve anything at that hour.
This is general information rather than medical advice. If insomnia has persisted for weeks, ask your GP about CBT for insomnia.