Sleep Optimization Coach
Builds a personalized, evidence-based sleep optimization plan from your current habits, environment, and lifestyle.
Example run
Generated by Claude Opus 5.5 on September 23, 2026
Inputs used
- Bedtime and wake time
- Bedtime around 12:30-1:00am, wake at 7:00am on weekdays (alarm), weekends I sleep in until 9:30-10:00am
- Sleep quality rating
- 4/10
- Time to fall asleep
- Usually 45-60 minutes, mind races about work
- Night waking frequency
- Wake up 2-3 times most nights, often around 3am, sometimes hard to fall back asleep for 30+ minutes
- Morning energy rating
- 3/10, need two cups of coffee before I feel functional
- Lifestyle factors
- Work as a software engineer, mostly remote, high-stress sprint deadlines every two weeks; drink 2-3 cups of coffee (last one around 3-4pm); have 2-3 glasses of wine most weeknights around 8-9pm; exercise inconsistently, maybe a 30-min walk 2x/week; screen time on laptop/phone right up until bed
- Sleep environment
- Bedroom faces a street with some traffic noise, streetlight leaks through thin curtains, room runs warm (no AC, fan only) around 74-76°F at night, mattress is 8 years old and starting to sag, use phone as alarm so it's on nightstand
- Primary sleep goal
- Fall asleep faster, stop waking up at 3am, and wake up feeling actually rested instead of needing coffee to function
Your Sleep Optimization Plan
Note: This is general, educational guidance, not medical advice. See a clinician if insomnia persists 3+ nights a week for 3+ months, if you snore loudly, gasp or choke at night, or wake with headaches, or if daytime fatigue stays severe despite these changes. Your profile has overlap with sleep apnea and chronic insomnia, and both are worth ruling out.
Quick Diagnosis
You spend about 6–6.5 hours in bed, but after 45–60 minutes to fall asleep and 30+ minutes awake overnight, you are likely getting only ~4.5–5 hours of actual sleep. That fits your 3/10 morning energy. Three drivers stand out:
1. Evening alcohol is fragmenting your sleep and likely causing the 3am wakings.
- Signals: 2–3 glasses of wine at 8–9pm most weeknights, plus repeated wakings around 3am.
- Your body clears roughly one drink per hour, so the alcohol is still active when you fall asleep. As it wears off, it causes a rebound in alertness in the second half of the night: lighter sleep, suppressed-then-rebounding REM, more wakings, and often more heat and bathroom trips. Alcohol also relaxes the airway, which can worsen snoring.
2. Hyperarousal: a busy brain with no off-ramp.
- Signals: 45–60 minutes to fall asleep with racing work thoughts, screens right up until bed, high-stress sprint cycles, remote work with no commute to separate work from home.
- Your brain has learned that "bed" means "time to process work." Late screens add alerting content and some light. Caffeine at 3–4pm adds to this: about half of it is still in your system at 9–10pm.
3. An irregular body clock and a hostile bedroom.
- Signals: 7:00 weekday wake time but 9:30–10:00 on weekends (about 3 hours of "social jet lag" every Monday), little morning light as a remote worker, room at 74–76°F, streetlight and traffic noise, a sagging mattress, and your phone on the nightstand.
- Your internal clock gets reset every weekend. The warm room also blocks the core-temperature drop your body needs to fall asleep and stay asleep.
1. Target Schedule
Action: Anchor your wake time at 7:00am every day (weekends no later than 8:00am). Gradually move bedtime to a target of 11:15–11:30pm, which gives about a 7.5-hour sleep window.
Why: A fixed wake time is the strongest single signal for your body clock. It also builds consistent "sleep pressure" so you fall asleep faster at night.
How:
- Protect the wake time first; bedtime follows. Get up at 7:00 even after a bad night. Sleeping in to "catch up" pushes the next night's sleep later.
- Only go to bed when sleepy (heavy eyelids, head nodding), not just tired. If that happens after your target bedtime during the shift, that's fine.
- Shift bedtime gradually, about 15 minutes every 3–4 days:
| Days | Lights out | Wake (weekdays) | Wake (weekends) |
|---|---|---|---|
| 1–4 | 12:30am | 7:00 | by 8:00 |
| 5–8 | 12:15am | 7:00 | by 8:00 |
| 9–12 | 12:00am | 7:00 | by 8:00 |
| 13–16 | 11:45pm | 7:00 | by 7:45 |
| 17–20 | 11:30pm | 7:00 | by 7:30 |
| 21+ | 11:15–11:30pm | 7:00 | 7:00–7:30 |
- Naps: Avoid them for now, since they reduce the sleep pressure you're building. If you truly need one, keep it to 20 minutes or less and before 2pm.
- Chronotype note: You may naturally be a later type, but your late screens and missing morning light are probably exaggerating it. If you still aren't sleepy by 11:30 after 3–4 weeks of morning light, settle at 11:45 rather than forcing it.
2. Wind-Down Routine (90 minutes, timed to an 11:30pm target)
Adjust the times to match wherever you are in the shift plan.
| Time | Activity | Why | How |
|---|---|---|---|
| Early evening (end of workday, ~6pm) | Work shutdown ritual (10 min) | Gives your brain a clear boundary that work is closed | Write tomorrow's top 3 tasks, note where you left off, close Slack and email, and say "shutdown complete." Log out of work accounts on your phone. |
| ~8:00pm | Worry dump / "constructive worry" (10–15 min) | Moves worries to paper so they don't show up in bed | See section 6 for the method. |
| 10:00pm | Dim the house; stop work-related screens | Dim light lets melatonin rise; work content is the most arousing | Switch to lamps instead of overhead lights and turn on Night Shift or warm mode. No email, Jira, or Slack. |
| 10:15pm | Warm shower or bath (10 min) | The rebound cooling afterward helps trigger sleepiness | A warm (not scalding) shower 60–90 minutes before bed works best. |
| 10:30pm | Phone goes to bed outside the bedroom | Removes the temptation to scroll and to check the time at 3am | Charge it in the kitchen or living room and use a cheap alarm clock instead. |
| 10:30–11:15pm | Low-stimulation activity | Gives you a buffer before bed | Paper book or e-ink reader, light stretching, puzzles, music, or talking. If you watch TV, pick familiar, low-stakes shows, keep it out of the bedroom, and sit 6+ feet away with the brightness down. |
| 11:15pm | Bedroom prep + breathing (5–10 min) | Signals "sleep now" | Fan on, white noise on, eye mask ready. Do 5 minutes of slow breathing (section 6). |
| 11:30pm | Lights out, only if sleepy | Keeps bed associated with sleep | Not sleepy yet? Keep reading outside the bed. |
3. Bedroom Setup
Temperature: aim for 60–67°F (about 16–19°C)
- Why: Your core temperature must drop to start and maintain sleep, and 74–76°F works against that. A warm room is a common cause of early-morning wakings.
- How (cheapest first):
- Close blinds during the day to block heat.
- If it's cooler outside at night, put a box fan in the window blowing out and crack another window to pull in cool air.
- Point a second fan at the bed.
- Switch to breathable sheets (cotton percale or linen) and a lighter blanket.
- Take the warm shower from your wind-down routine; the cooling afterward helps.
- If summer nights stay above 72°F, a window or portable AC unit is one of the best sleep investments you can make.
Light: aim for near-total darkness
- Why: Light leaking through your eyelids can lighten sleep and may disturb it during lighter stages near morning.
- How: Install blackout curtains or blackout liners behind your current curtains. A contoured sleep mask is a good $10–20 option while you wait. Cover or remove LED indicator lights, and turn the alarm clock display to its dimmest setting or face it away.
Noise: aim for steady, masked sound
- Why: Traffic noise is a problem because it changes suddenly, and those spikes cause brief arousals even when you don't remember them.
- How: Use a white or pink noise machine (or your fan) at a steady, moderate volume between you and the window. Foam or silicone earplugs are another option. Heavy curtains also dampen some sound.
Bedding and mattress
- Why: A sagging 8-year-old mattress can cause discomfort and position changes that fragment sleep. Most mattresses are due for replacement at around 7–10 years.
- How: Plan to replace it; many companies offer 100-night trials. As a stopgap, try a 2–3" latex or firm foam topper and rotate the mattress. Check that your pillow keeps your neck in a neutral position.
Phone out; analog alarm in
- Why: Keeping your phone nearby invites late scrolling, work notifications, and checking the time at 3am, which feeds anxiety about sleep.
- How: Buy a basic $10–20 alarm clock or a sunrise alarm clock, which also gives you gentle morning light.
4. Daytime Levers
Morning light
- Action: Get 10–30 minutes of outdoor light within an hour of waking.
- Why: Morning light is the strongest cue for setting your body clock earlier, which makes it easier to fall asleep at 11:30. Remote workers often go all day without bright light.
- How: Take your first coffee outside, or move one of your walks to the morning as a "fake commute." Overcast days still work; stay out longer. Don't wear sunglasses, and never look directly at the sun. Work near a window during the day.
Movement
- Action: Build up to about 150 minutes a week, such as a 30-minute walk 5 days a week, plus 2 short strength sessions.
- Why: Regular exercise deepens sleep and lowers stress-driven arousal. Consistency matters more than intensity.
- How: Make the morning light walk the default. Put a 20–30 minute afternoon walk between sprint meetings. Finish vigorous workouts at least 2–3 hours before bed; gentle stretching at night is fine.
Caffeine cutoff: noon (1pm at the latest)
- Why: Caffeine's half-life is about 5–6 hours, so a 3:30pm coffee still has meaningful effects at midnight. That lengthens the time it takes to fall asleep and makes sleep lighter.
- How:
- Keep your 2 morning cups, but make the last one by noon.
- Replace the afternoon cup with decaf (it has a small amount of caffeine), herbal tea, sparkling water, or a 5-minute walk outside.
- Expect a mild afternoon dip for about a week while you adjust.
- Once your sleep improves, you may find you need less coffee overall.
Alcohol cutoff: at least 3–4 hours before bed, with alcohol-free weeknights as the goal
- Why: Alcohol is the most likely direct cause of your 3am wakings (see the diagnosis).
- How: See section 5 and the 14-day plan below.
5. Nutrition Timing
| What | When | Why / How |
|---|---|---|
| Dinner | Finish 2.5–3 hours before bed (by ~8:30pm) | Active digestion and reflux interfere with sleep. Keep dinner balanced: protein, vegetables, and complex carbs. |
| Optional snack | 60–90 minutes before bed, only if hungry | Hunger can wake you. Keep it small: yogurt, a banana with a spoon of nut butter, a small bowl of oatmeal, or whole-grain toast. |
| Fluids | Taper in the last 60–90 minutes | This reduces bathroom-driven wakings. Hydrate well earlier in the day. |
| Alcohol | Ideally none on weeknights; otherwise 1 glass or fewer with dinner, finished by ~7:30pm | This is your biggest nutrition lever for 3am wakings. |
| Replacement ritual | 8–9pm, your current wine slot | The wine is probably doing a job: marking the end of work and helping you decompress. Keep the ritual and change the drink. Try sparkling water with bitters or citrus in a nice glass, non-alcoholic wine or beer, or chamomile or another caffeine-free herbal tea. |
| Avoid late | Last 3 hours before bed | Heavy, fatty, or spicy meals, large portions, sugary desserts, chocolate (it has a little caffeine), and "decaf" teas that aren't actually caffeine-free. |
On supplements: Magnesium, tart cherry, and low-dose melatonin have some evidence behind them but modest effects. Ask a clinician or pharmacist before starting any of them, especially if you take other medications. They work best as add-ons, not replacements for the habits above.
6. Mind & Stress Techniques
A. Constructive worry / worry dump (early evening)
- Why: Handling worries at a set time, away from bed, reduces pre-sleep rumination. In studies, writing a specific to-do list before bed helped people fall asleep faster.
- How: Around 8pm, take a sheet of paper with two columns: "What's on my mind" and "Next step / when I'll deal with it." For sprint worries, write the concrete next action ("Ask Priya about the API bug at standup"). If there's no action, write "Can't solve tonight; revisit Thursday." Then close the notebook. When those thoughts come up in bed, tell yourself: "That's on the list. It's handled for now."
B. Slow breathing / physiological sigh (in bed and during 3am wakings)
- Why: A long exhale activates the parasympathetic "brake" and calms the physical side of stress.
- How: Try either of these:
- Physiological sigh: Two inhales through the nose (one full, one small top-up), then a long, slow exhale through the mouth. Repeat 3–5 times.
- Slow-paced breathing: Breathe in for 4 seconds and out for 6 seconds, for 5 minutes.
C. Cognitive shuffle (for a racing mind in bed)
- Why: It fills your working memory with random, emotionally neutral images, which crowds out problem-solving. Your brain reads that kind of scattered thinking as a sign of sleep onset.
- How: Pick a neutral word (e.g., "BLANKET"). For each letter, picture as many unrelated things starting with that letter as you can: B → banana, bicycle, balloon... then L → lamp, lizard... Move on when you run out. Keep it relaxed; it isn't a test.
Also useful: Progressive muscle relaxation (tense each muscle group for 5 seconds, then release, moving from toes to head) or a guided body scan or NSDR recording. Don't play these from a phone on your nightstand; use a smart speaker or start them before the phone leaves the room.
7. Troubleshooting
"I've been lying awake and can't fall asleep."
- Action: Get up if you've been awake about 20 minutes. Estimate this; don't check a clock.
- Why: This is stimulus control, a core part of CBT-I. It retrains your brain to link bed with sleep instead of lying awake worrying.
- How: Go to a dimly lit room and do something calm and boring, such as a paper book, a puzzle, or folding laundry. No screens and no work. Return to bed when sleepy, and repeat as needed. Keep your 7:00 wake time regardless. The first few nights may feel worse, which is normal and usually temporary.
"I woke up at 3am again."
- Action: Don't check the time or your phone. Do slow breathing or a cognitive shuffle first. If you're still awake after about 20 minutes, get up as above.
- Why: Checking the time sets off "only 4 hours left" math, which spikes alertness. Most 3am wakings in your profile trace back to alcohol, heat, or noise.
- How: Turn the clock to face the wall. The next day, check your log: Did you drink? Was the room warm? Was there traffic? Fix the pattern rather than the single night.
"Bad night. I'm exhausted."
- Action: Get up at 7:00 anyway, get morning light, keep the noon caffeine cutoff, and skip naps.
- Why: Staying on schedule builds sleep pressure, so the next night is usually better. Compensating tends to create a cycle of bad nights.
- How: Don't raise your alcohol or caffeine to "cope." Go to bed when sleepy, even if that's a bit earlier than planned (no more than 30 minutes early).
"It's sprint week and my brain won't shut off."
- Action: Make the shutdown ritual and worry dump non-negotiable, and protect the wake time.
- Why: This is when your sleep is most vulnerable and when you most need good sleep for focused debugging.
- How: Set a hard stop time for work. If you must work late, stop 60 minutes or more before bed and do a longer worry dump afterward.
"I'm groggy even after a decent night."
- Action: Give yourself 15–30 minutes to wake up.
- Why: Sleep inertia is normal. It also takes 2–4 weeks for a regular schedule to reset your body clock.
- How: Drink water, open the curtains, get outside, and move. Wait until you're up and in the light before your first coffee.
Red flags: see a clinician if any of these apply:
- You snore loudly, or someone notices you pause breathing or gasp.
- You wake with headaches or a dry mouth.
- You feel unrefreshed even after 7+ hours.
- You have restless or crawling sensations in your legs at night.
- Insomnia continues after 4–6 weeks of these changes, or persists 3+ nights a week for 3+ months.
- You have ongoing low mood or anxiety.
Ask specifically about CBT-I (Cognitive Behavioral Therapy for Insomnia). It's the first-line treatment for chronic insomnia. The free CBT-I Coach app from the U.S. Department of Veterans Affairs is a good place to start.
14-Day Starter Plan
Start with just these three changes. Add the rest (bedroom upgrades, caffeine cutoff, more movement) once they feel automatic.
| # | Change | Why it's first | Minimum version |
|---|---|---|---|
| 1 | Alcohol-free weeknights (Sun–Thu), replacing wine with an alternative drink at 8–9pm | Most likely direct cause of your 3am wakings | If full alcohol-free is too much, have 1 glass or fewer, finished with dinner by ~7:30pm |
| 2 | Fixed 7:00am wake time every day (weekends by 8:00) plus 10–15 minutes of outdoor morning light | Resets your body clock, ends Monday "jet lag," and makes falling asleep easier | Get up on time, open the curtains, and drink your coffee outside or by an open window |
| 3 | Phone out of the bedroom by 10:30pm, a 60-minute screen-free wind-down, and the 8pm worry dump | Targets your racing mind and the time it takes to fall asleep | Buy a $15 alarm clock and do a 5-minute worry dump |
Quick win if it's easy: A $15 sleep mask and earplugs or a white-noise app on a speaker.
Your One Metric: Morning Energy (1–10), rated before coffee
Every morning before your first cup, write down:
- Your energy score, 1–10 (the headline metric: your baseline is 3)
- Two quick yes/no notes: alcohol last night? and woke at 3am?
What success looks like at day 14: Energy averaging 5–6 or higher, fewer 3am wakings on alcohol-free nights, and falling asleep noticeably faster. The yes/no notes will show you your own alcohol-and-sleep connection in your own data, which tends to be more motivating than any general advice.
After day 14, add the noon caffeine cutoff and bedroom cooling, and keep moving bedtime toward 11:30pm.
Related prompts
5-Minute Guided Meditation Script
Generates a structured, read-aloud 5-minute guided meditation script tailored to your chosen focus and experience level.
Healthy Habit Formation Coach
Designs a personalized, science-based plan to build one healthy habit that actually sticks.
Exercise Form and Technique Guide
Coaches proper form, cues, and safe progressions for any exercise to prevent injury and build strength.
Quick Workout Generator for Busy People
Generates a compact, efficient workout tailored to your time, equipment, goals, and fitness limitations.