You already know phones are bad for sleep. You've read the articles, you've felt the consequences — the groggy mornings, the 1 a.m. scroll sessions you didn't plan on, the way "just five more minutes" turns into an hour. Knowing isn't the problem. The problem is that your phone is designed to be opened, and willpower alone isn't a reliable defense against that design.
The fix isn't another reminder to put your phone down. It's making your phone structurally harder — or impossible — to misuse after a certain hour. This guide walks you through exactly how to do that.
Why "Just Put It Down" Doesn't Work
App designers, notification systems, and recommendation algorithms are built to pull you back in. Every time you unlock your phone to check the time, there's a banner waiting. Every time you open one app "quickly," the feed is already loaded. The friction between you and distraction is essentially zero.
Behavioral research consistently shows that environment design beats intention. If you have to actively resist something every night, you will eventually fail. But if the thing you're trying to avoid requires effort to access, you'll avoid it most of the time without thinking about it.
That's the logic behind a strict bedtime lock: you're not relying on discipline at 11 p.m. when you're tired. You're setting up a system earlier in the day that makes the bad behavior harder than the good one.
What a Real Bedtime Lock Looks Like
A real bedtime lock isn't a gentle nudge. It's not a grayscale screen or a "time to wind down" notification you can dismiss. A real lock means specific apps — or all apps — become inaccessible during a set window, and getting around it requires friction you won't want to deal with when you're half asleep.
On iPhone, the closest built-in tool for this is Screen Time's Downtime feature. Here's how it works, what it doesn't do, and how to make it as strict as possible.
Setting Up Downtime on iPhone
- Open Settings and tap Screen Time.
- If Screen Time isn't already enabled, tap Turn On Screen Time.
- Tap Downtime.
- Toggle it on and set your start and end times — for example, 10:00 p.m. to 7:00 a.m.
- Choose whether to apply it every day or on a custom schedule.
During Downtime, most apps will be greyed out and show a lock icon. Phone calls and any apps you've explicitly allowed will still work. Everything else requires you to tap "Ignore Limit" — which brings us to the most important step.
Setting a Screen Time Passcode
Without a passcode, Downtime is easy to bypass. You tap one button and you're back in. To make it meaningful, you need to lock the Screen Time settings behind a code you won't use casually.
- In Screen Time, tap Use Screen Time Passcode.
- Set a four-digit code — and here's the key: don't use a code you'll remember easily. Give it to someone else, write it down somewhere inconvenient, or use a random number you don't know off the top of your head.
- Apple will ask for your Apple ID as a recovery method. Complete that step so you're not permanently locked out.
With a passcode set, bypassing Downtime requires entering a code you don't have memorized. At midnight, that's usually enough friction to make you give up and go to sleep.
Choosing Which Apps to Allow During Downtime
You'll likely want some apps to stay accessible — your alarm, phone calls, maybe a meditation or white noise app. In Screen Time, go to Always Allowed and add only what's essential. Be conservative. Every app you allow is a potential rabbit hole.
A reasonable always-allowed list looks like this:
- Clock (for alarms)
- Phone (for emergencies)
- Messages (if you need to be reachable)
- One sleep or relaxation app, if you use one
Everything else — social media, email, news, streaming apps, browsers — should be blocked.
The Problem With Native Downtime
Apple's Downtime is a solid starting point, but it has real weaknesses that make it easier to bypass than it should be.
First, the "Ignore Limit" button is always visible. It requires one extra tap and, if no passcode is set, zero effort. Even with a passcode, determined late-night scrollers find ways around it.
Second, Screen Time settings can be changed at any time if you know the passcode — meaning if you do know your code (or if you set it to something you use elsewhere), the whole system falls apart.
Third, there's no enforcement of intent. If you set Downtime to start at 10 p.m. but decide at 9:58 to extend it "just this once," there's nothing stopping you.
This is where a dedicated app adds real value. Sleep Lock is built specifically for this use case. You set a sleep window, and during that window, your selected apps are blocked through Apple's Screen Time APIs — but the controls are designed to remove the easy escape hatches that make native Downtime so easy to circumvent. It runs locally on your device with no account required and no data collection, so it's purely a tool for enforcing the boundaries you set for yourself.
Other Steps That Make the Lock More Effective
The app block is the core mechanism, but a few supporting habits make it significantly more effective.
Charge Your Phone Outside the Bedroom
This is the oldest advice in the book because it works. If your phone isn't within arm's reach, you can't reach for it at 2 a.m. Buy a separate alarm clock — they cost less than ten dollars — and put your phone on the charger in the hallway or kitchen before your Downtime window starts.
Combined with an app lock, this creates two layers of friction: physical distance and a software barrier. Both have to be overcome simultaneously, which almost never happens.
Set Downtime to Start Before You Want to Sleep
If you want to be asleep by 11 p.m., don't set Downtime to start at 11 p.m. Set it for 10:00 or 10:30. The winding-down period — when you're getting ready for bed, brushing your teeth, reading — should already be inside the lock window. This prevents the "just a few more minutes before my lock kicks in" problem.
Use Do Not Disturb Alongside the App Lock
Blocked apps won't keep you awake, but notifications from allowed apps still might. Set up a Sleep Focus mode or Do Not Disturb schedule to silence notifications during your sleep window. Go to Settings > Focus > Sleep and configure it to activate automatically at your bedtime.
This way, even if a message comes in on an allowed app, your screen won't light up and your phone won't make noise.
Make Your Lock Window Non-Negotiable for at Least Two Weeks
The first few nights with a strict bedtime lock can feel annoying. You'll think of things you "need" to check. You'll want to look something up. Let those urges pass. Within a week or two, the habit of not reaching for your phone at night starts to replace the habit of reaching for it. The discomfort is front-loaded.
The goal isn't to make your phone useless. It's to make it useless during the specific hours when using it costs you sleep and gives you nothing in return.
What to Do If You Keep Bypassing Your Own Lock
If you find yourself regularly overriding Downtime or guessing your passcode, the system needs to be tighter, not your willpower.
- Change your passcode to something random and store it somewhere inconvenient — a notes app that's also blocked, a piece of paper in another room, or ask someone else to hold it.
- Reduce the always-allowed list to the bare minimum. If you're using an "allowed" app as a backdoor to waste time, remove it from the list.
- Move the phone physically farther away. If it's across the room, the activation energy to go get it, unlock it, navigate to settings, and override a passcode is usually enough to stop you.
- Tell someone. Accountability is a legitimate tool. If someone else knows your lock schedule, you're less likely to dismantle it quietly.
The Takeaway
Locking your phone at night isn't about punishing yourself or swearing off technology. It's about acknowledging that your phone, left unrestricted, will compete with your sleep — and your sleep will usually lose. The solution is a system: a scheduled block, a passcode you don't have memorized, a phone that charges outside your bedroom, and a lock window that starts before you're already in bed.
Set it up tonight. Use Apple's built-in Downtime as a baseline, add a Screen Time passcode, or use a dedicated tool like Sleep Lock if you want tighter enforcement without configuration hassle. Start your lock window 30 to 60 minutes before you want to be asleep. Put your phone on the charger in another room. Do that for two weeks, and the pattern will start to feel normal — because it will be.