What actually fixes terrible sleep?
Longetic is a health record app, not a sleep tracker, so start with the habits sleep medicine actually tests: a fixed wake time, dim evenings, a caffeine cut-off, a cool dark quiet room, less alcohol, daytime movement, no late heavy meals, a wind-down hour, getting out of bed when sleep will not come, and a written log.
Ten habits is a long list, and the honest version of this article says two things at once. Each habit below has a named source behind it, and none of them is a treatment. The American Academy of Sleep Medicine is explicit on that second point: in its 2021 clinical practice guideline for chronic insomnia in adults, it suggests "that clinicians not use sleep hygiene as a single-component therapy for the treatment of chronic insomnia disorder in adults." Habits are where you start, not where you stop.
The anchor number is simpler than the habits. The AASM and the Sleep Research Society put it in one sentence: "Adults should sleep 7 or more hours per night on a regular basis to promote optimal health." Everything below is in service of that.
Which ten habits does the sleep literature actually support?
The ten below come from the AASM healthy sleep habits list and from peer-reviewed trials and meta-analyses. Three of them have measured effect sizes behind them: caffeine six hours before bed, evening room light, and physical activity. The rest are consensus advice from sleep medicine bodies, which is weaker evidence but still the best available.
Read the table at the end of this section before the ten entries if you want the sourcing at a glance. The order below is roughly the order of effort: the first habit costs nothing but consistency, the tenth costs two weeks of mornings.
1. Get up at the same time every day, weekends included
The AASM puts the fixed point at the morning end, not the evening one: "Keep a consistent sleep schedule. Get up at the same time every day, even on weekends or during vacations." The NHS says the same thing twice over, once as a thing to do, "wake up and get out of bed at the same time every day", and once as a thing not to do: "do not sleep in after a bad night's sleep", and "stick to your regular sleeping hours instead." A fixed wake time is the only habit on this list that both bodies state in identical terms.
2. Dim the lights in the evening
This is the habit with the sharpest number attached. Gooley and colleagues compared people living in ordinary room light with people in dim light in the eight hours before bed, and reported that room light "suppressed melatonin, resulting in a later melatonin onset in 99.0% of individuals and shortening melatonin duration by about 90 min." Light during the hours you are normally asleep was worse again: it "suppressed melatonin by greater than 50% in most (85%) trials." The AASM advice follows from it: "Limit exposure to bright light in the evenings" and "Turn off electronic devices at least 30 minutes before bedtime."
What that study does not cover is morning light. The claim that getting daylight early helps reset the clock is widely repeated, and this article does not make it, because no source we could read in the course of writing supports it directly. Evening light is the part with evidence behind it.
3. Set a caffeine cut-off, and move it earlier than you think
Drake and colleagues gave people a fixed 400 mg dose of caffeine at bedtime, three hours before bed, and six hours before bed, and measured against placebo. All three timings mattered: "a moderate dose of caffeine at bedtime, 3 hours prior to bedtime, or 6 hours prior to bedtime each have significant effects on sleep disturbance relative to placebo." Their conclusion names the cut-off directly, as "empirical support for sleep hygiene recommendations to refrain from substantial caffeine use for a minimum of 6 hours prior to bedtime."
That 400 mg is what the researchers administered in a trial, and it is quoted here as the study design, not as a figure for you to aim at or avoid. The practical point is the six hours, not the milligrams. The NHS draws the line in the same place and folds three substances into it: "do not smoke or drink alcohol, tea or coffee at least 6 hours before going to bed."
4. Make the room cool, dark, and quiet
The AASM wording is "Make your bedroom quiet and relaxing. Keep the room at a comfortable, cool temperature." The NHS version is practical about how: "make sure your bedroom is dark and quiet", using "curtains, blinds, an eye mask or ear plugs if needed", and separately, "make sure your mattress, pillows and covers are comfortable." Neither body names a temperature in degrees, and neither does this article.
5. Stop using alcohol as a sleep aid
Alcohol does the first half of the job and undoes it in the second. Ebrahim and colleagues reviewed the normal-sleep literature and found that "at all dosages, alcohol causes a reduction in sleep onset latency, a more consolidated first half sleep and an increase in sleep disruption in the second half of sleep." On REM sleep, "the onset of the first REM sleep period is significantly delayed at all doses", and total REM is reduced in most studies at moderate and high doses, with no clear pattern at low doses.
Falling asleep faster is exactly what makes alcohol feel like it works, and it is the one effect that is real. Everything after the first few hours goes the other way.
6. Move during the day
Kredlow and colleagues pooled 66 studies and found that regular exercise "has small beneficial effects on total sleep time and sleep efficiency, small-to-medium beneficial effects on sleep onset latency, and moderate beneficial effects on sleep quality." Those are small-to-moderate effects, stated as such, and the honest summary is that exercise reliably helps a bit rather than dramatically. The AASM line is one clause: "Exercise regularly and maintain a healthy diet."
7. Do not eat a large meal late
The AASM says "Don't eat a large meal before bedtime. If you are hungry at night, eat a light, healthy snack", and the NHS says "do not eat a big meal late at night." The strongest recent data behind this is about timing rather than size: Yan and colleagues analysed 7,023 people in NHANES and reported that "later meal timings and more frequent meal occasions were significantly associated with poorer sleep quality." That study is cross-sectional, so it shows an association, not a cause, and it says nothing about how big the meal was.
8. Build a wind-down hour
The AASM asks for a routine, "Establish a relaxing bedtime routine", and for the bed to mean one thing, "Use your bed only for sleep and sex." The NHS puts a clock on it: "relax at least 1 hour before bed", for example with a bath or a book. An hour is the number a national health service publishes, which is why it is the number here.
9. Go to bed only when sleepy, and get up if you are not
This is the one habit on the list that sleep medicine treats as a therapy in its own right rather than as hygiene. The AASM states both halves plainly: "Don't go to bed unless you are sleepy", and "If you don't fall asleep after 20 minutes, get out of bed. Go do a quiet activity without a lot of light exposure. It is especially important to not get on electronics." The NHS first bullet is the same instruction: "only go to bed when you're sleepy."
In the AASM 2021 guideline this is named stimulus control, and it carries a recommendation of its own: clinicians are advised to "use stimulus control as a single-component therapy for the treatment of chronic insomnia disorder in adults", rated conditional. That is a stronger standing than the rest of the list gets.
10. Write down what you take, and when
The last habit is the one that turns the other nine into something a doctor can read. The AASM publishes a two-week sleep diary, and its instructions ask for exactly four things to be marked on the grid alongside your sleep: "Put the letter 'C' in the box when you have coffee, cola or tea. Put 'M' when you take any medicine. Put 'A' when you drink alcohol. Put 'E' when you exercise."
Caffeine, medicine, alcohol, exercise. Those four codes are the same four habits as numbers 3, 5, 6 and the medicines you already take, which is why the diary is the natural end of this list rather than an eleventh chore. The AASM guidance on length is one sentence: "A typical sleep diary covers a two-week period. It is most effective when you complete it daily."
| Habit | What the source says | Source |
|---|---|---|
| Fixed wake time | Same time daily, weekends included | AASM; NHS |
| Dim evenings | Melatonin onset later in 99.0% of people | Gooley 2011 |
| Caffeine cut-off | At least 6 hours before bed | Drake 2013; NHS |
| Cool, dark, quiet room | No temperature named | AASM; NHS |
| Less alcohol | Second half of the night disrupted | Ebrahim 2013 |
| Daytime movement | Small to moderate benefit | Kredlow 2015 |
| No late heavy meal | Later meals linked to worse sleep | Yan 2024; NHS |
| Wind-down hour | At least 1 hour before bed | NHS; AASM |
| Out of bed after 20 minutes | Stimulus control, conditional | AASM 2021 |
| Two-week written log | Daily, four codes marked | AASM sleep diary |
Where do England and Spain send you with a sleep problem?
In England the route is your GP, and the NHS names three triggers for going. In Spain it is your centro de salud and your médico de familia, and the Ministry of Health calls primary care the gateway to the whole system. The two systems also differ on one concrete thing: Spain publishes advice to keep a sleep diary, and the NHS insomnia page does not mention one.
England first. The NHS insomnia page carries a bulleted trigger list under the heading "See a GP if", and it is short: "changing your sleeping habits has not helped your insomnia", "you've had trouble sleeping for months", and "your insomnia is affecting your daily life in a way that makes it hard for you to cope." What happens then is also stated: "A GP will try to find out what's causing your insomnia so you get the right treatment", "sometimes you'll be offered cognitive behavioural therapy (CBT)", and "GPs now rarely prescribe sleeping pills to treat insomnia." NICE puts the order of treatment in a single sentence: "CBTi is the standard first treatment for people with long-term insomnia after sleep hygiene advice is offered." This is guidance for England; Scotland and Wales run their own health services and their advice can differ.
Spain next. The Ministry of Health describes primary care as the way in: "La Atención Primaria (AP) es la puerta de entrada al Sistema Nacional de Salud (SNS)", the gateway to the National Health System. Its clinical practice guideline for insomnia in primary care, written for patients, is direct about where to go, "para encontrar el tratamiento más adecuado para su problema, acuda a su centro de salud", and about who decides on medicines, "su médico de familia es la persona indicada para decirle qué fármaco es el más conveniente". That guideline is from 2009, which is old for clinical guidance, and it is quoted here for the route through the system rather than for drug advice.
One caveat that matters more in Spain than in England: health competencies are devolved. The Ministry states that the system "se caracteriza por su amplia descentralización, que culminó definitivamente en el año 2002, momento a partir del cual todas las Comunidades Autónomas disponen de las competencias sanitarias", so what a referral looks like, and which app holds your record, depends on your comunidad autónoma.
| Question | England (NHS) | Spain |
|---|---|---|
| Where you start | Your GP | Your centro de salud |
| Who decides on medicines | A GP | Your médico de familia |
| Named trigger to go | Three, published | Not published as a list |
| Sleep diary in national advice | Not mentioned | Recommended |
| First-line treatment named | CBT for insomnia | Sleep hygiene, psychological, drug |
| Local variation | Scotland and Wales differ | Devolved to each comunidad |
The sleep diary row is the one worth pausing on. Spain's patient guideline says a "diario de sueño-vigilia, donde usted anotará información relacionada con su sueño, puede resultar un instrumento de gran utilidad". In English: a sleep-wake diary can be a very useful instrument. On the NHS insomnia page, a sleep diary is not mentioned at all. If you are in England and you bring one, you are bringing something the national guidance does not ask for and a clinic will still read.
Where does official advice disagree with the evidence?
On exercise timing, mainly: the NHS tells you not to exercise within four hours of bed. A 2019 meta-analysis of 23 studies found the opposite for most evening exercise, with a narrow exception for vigorous sessions ending within an hour of bedtime. Caffeine and alcohol show no such split: there the official line and the trials agree.
Stutz and colleagues reviewed evening exercise in healthy participants and concluded that "the studies reviewed here do not support the hypothesis that evening exercise negatively affects sleep, in fact rather the opposite", while adding that "sleep-onset latency, total sleep time, and SE might be impaired after vigorous exercise ending ≤ 1 h before bedtime." Measured against that, the NHS instruction, "do not exercise at least 4 hours before bed", is the more cautious of the two positions.
This article does not resolve the disagreement and you should not treat it as resolved. Both positions are stated, both are attributed, and the choice between them is a conversation for the person treating you.
| Item | Official guidance | Peer-reviewed finding |
|---|---|---|
| Evening exercise | NHS: none within 4 hours | Stutz 2019: not harmful overall |
| Vigorous exercise near bed | Not separated out | May impair within 1 hour |
| Caffeine | NHS: none within 6 hours | Drake 2013: supports 6 hours |
| Alcohol | NHS: none within 6 hours | Ebrahim 2013: disrupts late night |
| Sleep hygiene as treatment | NHS: offered first | AASM 2021: not on its own |
When do sleep habits stop being enough?
When the habits have been tried and nothing changed, when the trouble has run for months, or when daily life is getting hard to cope with. Those are the three triggers the NHS publishes. Sleep medicine agrees from the other direction: the AASM recommends multicomponent cognitive behavioural therapy for chronic insomnia and advises against sleep hygiene used on its own.
The AASM 2021 guideline gives its only strong recommendation to therapy, not to habits: clinicians should "use multicomponent cognitive behavioral therapy for insomnia for the treatment of chronic insomnia disorder in adults", rated strong. Sleep hygiene as a standalone gets the opposite treatment in the same list. In England, NICE has also approved a digital route, recommending Sleepio "as a cost saving option for treating insomnia and insomnia symptoms in primary care for people who would otherwise be offered sleep hygiene or sleeping pills."
If the problem looks less like insomnia and more like something happening to your breathing at night, that is a different appointment, and the NHS says so: "you may be referred to a sleep clinic if you have symptoms of another sleep disorder such as sleep apnoea." We have written separately about questions worth asking a sleep specialist, including what a clinic does with the diary you bring.
What should you write down, and bring to your doctor?
Two weeks of mornings, and four marks a day: a C for coffee, cola or tea, an M for any medicine, an A for alcohol, an E for exercise. Those four are the habits this article is about, which is why the diary is the last item rather than a separate task. Bring it to the appointment with the dates on it.
The diary is the only part of this list that cannot be improvised on the day, because it needs ordinary nights behind it. Fill it in each morning rather than reconstructing the week on the way to the surgery; the AASM says it "is most effective when you complete it daily." If you want the clinical side of it, including which questions to expect and what a sleep clinic does with that diary, we have covered it separately.
What you want to leave the appointment with is a different list from the one you arrive with, and it is worth writing down too: what to keep after the appointment is its own job. Longetic holds the record either side of that visit: lab reports, doctor visits and the medicines you take. It does not track sleep, so the diary itself stays on paper or in whatever app you already use.