Curiosity

How Sleep Actually Works: The Two Switches That Decide When You Sleep

August 9, 20269 min read
4
Think you already know this? Test yourself before reading.

You don’t decide to fall asleep. Two separate systems in your body decide for you, and they have to agree — which is exactly why you can be exhausted at 2am and still lie there wide awake. This is a follow-on to the caffeine article, which covered one half of this system without naming the other.

The two switches

Sleep researchers have modeled this the same way since the early 1980s, when Swiss scientist Alexander Borbély laid out what’s now called the two-process model. Two independent systems run in parallel:

Process S — sleep pressure. This is the adenosine story from the caffeine article. Every hour you’re awake, adenosine builds up in your brain and pushes harder for sleep. It’s a simple counter: the longer you’ve been up, the higher it climbs. Sleep is what drains it back down.

Process C — the body clock. Completely separate, and it doesn’t care how long you’ve been awake. It’s a roughly 24-hour cycle that raises and lowers your alertness on a fixed schedule, whether you slept last night or not.

You fall asleep when sleep pressure is high and the body clock has swung toward its low point. Both, not either.

This model explains a few things you’ve probably felt without having a name for them. The 3pm slump is real and isn’t about lunch — it’s a genuine dip in the body clock’s alertness signal. The second wind late in the evening is also real: the clock pushes alertness back up right when sleep pressure is getting high, which is why 9pm can feel more productive than 4pm despite being later in the day.

Where the clock actually lives

The body clock is a specific piece of tissue: the suprachiasmatic nucleus, or SCN — a cluster of about 20,000 brain cells, roughly the size of a grain of rice. It sits in the hypothalamus, which is the part of your brain that handles the housekeeping you never think about: body temperature, hunger, thirst, and the release of hormones. Sleep timing is one more thing on that list.

The SCN keeps its own near-24-hour rhythm even in total darkness — but it runs slightly off from exactly 24 hours, so it needs resetting daily, and light is what resets it.

There’s a dedicated wiring path for this. Your retina — the light-sensing layer at the back of your eye — contains special cells separate from the ones you see images with. These run a direct line to the SCN, and their entire job is reporting “it’s bright out.” When that signal fades in the evening, the SCN tells your pineal gland — a pea-sized gland near the middle of your brain — to start releasing melatonin.

This is the part most people get backwards: melatonin doesn’t knock you out. It works as a timing signal — a chemical announcement that says “it’s night now,” which nudges the whole system toward sleep. Light suppresses it directly, which is the actual mechanism behind the advice about screens at night.

So yes — looking at a screen in bed works against you. Phone, tablet, laptop, TV: the light reaches those retina cells, they report “still daytime,” and the melatonin signal gets held back.

The effect is real but smaller than headlines suggest: studies of normal screen use find melatonin drops by roughly 10–35%, not a total shutdown. Two things make it worse. A dark room, because your eyes adapt to their surroundings, so a bright screen against total darkness is a much stronger signal than the same screen in a lit room. And anything that winds you up — arguments, work email — which keeps you awake through a completely separate route we’ll get to below. Putting screens away about an hour before bed is where the evidence lands.

How sleep gets triggered

Here’s what’s strange about falling asleep: you can never catch the moment it happens. The reason is in the wiring.

Two groups of brain cells fight over this, and only one can win. The alertness system, in the lower part of your brain, keeps you awake. The VLPO (short for ventrolateral preoptic nucleus) starts sleep — it sits in the hypothalamus a few millimeters from the SCN, but does a different job: the SCN is the clock that tracks time, the VLPO is the switch that acts on it.

Each side shuts the other one down. Engineers will recognize this as a flip-flop circuit: two stable states, no comfortable middle. Whichever side gains the slightest edge suppresses the other, which widens its own lead — so the switch slams over instead of easing across. That’s why sleep arrives all at once, and why lying there wide awake means the alertness side is winning.

Here are the parts themselves, and how the signals move between them. Step through a day and watch which pieces are active — and notice that at 9pm the pressure is already high, but you’re still awake:

A third player, a brain chemical called orexin, acts as a stabilizer holding the switch in the wake position. It’s what stops you from flickering between states all day. When the orexin system fails, the switch does become unstable — that’s narcolepsy, where people drop into sleep abruptly during the day.

What happens while you're asleep

Sleep runs in cycles. You move through several distinct stages every 90 to 110 minutes, four to six times a night:

StageWhat it is
N1The doorway — a few minutes of drifting. This is where that falling sensation and sudden jerk can happen.
N2The bulk of your night, around half of total sleep. Body temperature drops, heart rate slows.
N3 (deep)Also called slow-wave sleep, because brain activity settles into long, rolling waves. Hardest stage to wake from — wake someone here and they’re groggy and confused. Concentrated in the first half of the night.
REMRapid eye movement. Brain activity looks almost like being awake, but your body is temporarily paralyzed, which is likely what stops you acting out dreams. Gets longer with each cycle.

That last row is the practical one. Because REM is back-loaded, cutting sleep short by two hours doesn’t shave 25% off each stage evenly — it removes a disproportionate share of your REM.

So why can't you sleep?

Now the two-switch model earns its keep. Every sleepless night is one of these gates failing, and which one decides what kind of night you get:

In words:

The two processes disagree. Jet lag is the clean example: your sleep pressure is high (you’ve been up 18 hours), but your body clock is still set to a timezone where it’s mid-afternoon, so it’s pumping out an alertness signal. Both switches have to agree, and they don’t. The same thing happens on a smaller scale every Monday if your weekend bedtime drifted late — researchers actually call it “social jet lag.”

Sleep pressure got drained early. A long late-afternoon nap dumps a chunk of accumulated adenosine. Come bedtime, the pressure just isn’t there yet.

Caffeine is masking the pressure. From the caffeine article: caffeine doesn’t reduce adenosine, it blocks you from feeling it. With a half-life around 5 hours, an afternoon coffee is still partly circulating at midnight.

Light told your clock it’s still daytime. Evening light suppresses melatonin directly, so the clock delays its “it’s night” signal.

An overactive alertness system — the “wired but tired” state. This is the one behind most chronic insomnia, and it’s genuinely different from the others. Here sleep pressure is high and the clock is in the right place, but the alertness system won’t stand down. Three things stay switched on that should have switched off: cortisol, the body’s main stress hormone; norepinephrine, a chemical that keeps you alert and reactive; and the sympathetic nervous system, the fight-or-flight side of your wiring that’s supposed to hand over to the rest-and-digest side at night. Brain scans show the regions involved in thinking and self-monitoring staying unusually busy, as if part of the brain is standing guard. Remember the flip-flop switch — it only works if one side clearly wins. An alertness system stuck on props up the wake side so the switch can’t flip, no matter how much pressure has built behind it. (Sleep researchers call this state hyperarousal, if you want to look it up.)

There’s a cruel feedback loop in that last one: worrying about not sleeping is itself alerting, which keeps the wake side propped up, which means you don’t sleep, which gives you more to worry about.

Get new posts by email

No spam, just a note when something new goes up.