Beeminding bedtime

I don’t get enough sleep. How can I beemind my bedtime to increase how much sleep I’m getting per night?



I use the app Sleep as Android on my phone, which records all kinds of data on my sleep (starttime, endtime, duration, location, amount of noise, amount of snoring, number of cycles, deep sleep %, actigraphs), and optionally uploads it to a website.

I then use a script to put the bedtime (as in hours after 22:00) into a beeminder goal (yorickvp/sleep), set to a rate of 7 per week so I have to go to bed, on average, before 23:00.


I posted to the old Akratics Anonymous list last week on this topic, and started running my new system on Monday. So far, it’s been pretty effective but that’s usual. It remains to be seen how long that will last.

To recap, I use two Beeminder goals: dutchie/out-of-bed and dutchie/lights-out. They track the number of minutes before a target hour (8am for out-of bed, midnight for lights-out) that I manage to get physically out of bed or turn the lights off to go to sleep. Currently input is done by hand, but I’m thinking of making an Android widget or something that I can just mash when I get up or turn the lights off. I’m also going to investigate the Sleep as Android app that yorickvp linked in the other reply. I also want to look into scripting the road flattening for weekends, which I also did by hand for the next month or two for now.

I started this on Monday, and barring an issue where I had the goals set 4 times too high (mental arithmetic is surprisingly hard for someone who has spent four years doing a maths degree), all is going well, as the graphs show. My previous “binary” system was much less flexible and now I have to actually catch up on sleep if I miss my target. I’ve also now got a log of my bedtimes, so that’s a big plus from a QS point of view. I’ll report back in a couple of weeks after it’s had a proper trial.

1 Like

I would check what it is that I’m normally doing that keeps me up past my bedtime, and beemind less of that past bedtime. If there’s nothing to do but go to sleep, then you’ll just naturally go to sleep.

1 Like

Does the app work if you share your bed with another person? I’ve thought about an app and/or the jawbone Up24 as a means for sleep tracking, but wasn’t sure if it would pick up the other person’s movements, instead?

1 Like

They have a faq entry about this, but it doesn’t mention the new support for smartwatches, whichmight help you as well (the armbands seem really inconvenient, though).

1 Like

I’ve tried a couple of different ways of beeminding my bedtime:

  1. A “do less” goal for “the number of hours after x o’clock I got to sleep”, and then allow yourself a certain number of hours per week (I think I set mine at 10 or 11pm and allowed myself 5 or so extra hours, to allow for later nights at the weekend etc.)

  2. A standard “do more” goal for setting my bedtime at the beginning of the day, and sticking to the time I set. So on the first day I enter a datapoint of 0 and a time I plan to go to bed that night in the comment, and the next day I enter a 1 if I did indeed go to bed at that time, and a comment for what time I plan to go to bed that night.

Both worked pretty well for me, though I think I slightly prefer 2. - the nice thing about setting your bedtime in the morning is it gives you a lot of flexibility, and allowing your “morning self” to set your bedtime means you generally set much more sensible bedtimes than if you let your 11pm self - who wants to stay up reading/watching TV/randomly surfing the internet - make the decision.

(I also just beemind the number of hours sleep I get a night, and aim to get an average of 8 hours, but don’t find this is enough on it’s own - it’s easy to stay on track whilst still only getting 6hrs sleep a night for several days in a row, once you’ve built up just a bit of buffer - and that’s nowhere near enough for me to function well… But it’s good for tracking.)


You can’t really, because Beeminder doesn’t have support for arbitrary goal endings so on an emergency day you have to get up before 3am to log that you went to sleep.

Alternatively you could just setup a standard do more goal, choose a bedtime and then use the app to track a 1 for each day you go to bed early enough. This has the added advantage of not tracking the exact time, so you don’t end up having to go to bed at 6 or something.

I tried this, but I didn’t really get along with it. I think the main issue was that it was hard to build up a buffer while still having an ambitious enough daily rate to make it actually motivating. I was running with 4.5/week, and as soon as you hit one eep day, it takes several weeks to get a day’s buffer again, particularly if you aren’t handling weekends specially.

Typing this has made me realise that “weekday only” goals require a little more thought than I had initially put in. My new regime uses holidays set in advance to give myself weekends off. However I think that my weekly rate is now slightly off what I actually want since it is calculated ignoring holidays; so for my goal of 11pm lights out, logging “minutes before midnight”, I should have a weekly rate of 760 = 560 with holidays at weekends, not my current rate of 560 = 300 (and similarly for the morning one).

In the spring I created a rule and a few exceptions that helped me go to sleep at a sane time. From my sleep pattern You can see that I actually managed to have a fairly regular bed time from the beginning of april to sometime in july.

I realized that usually the reason that I went to bed too late was that I didn’t feel tired, so I would just continue randomly browsing the internet. I rarely have a good reason to be up past midnight, so I just chose that as my threshold and created the main rule: If I’m not already in bed by midnight, I have to go to bed. I should still follow my regular routine (brushing teeth etc.) and I don’t have to rush, but I may not do anything else.

The rest of the rules are just exceptions that allow me to stay up if I have a good reason:

  • Being on my way home from somewhere counts as part of the “going to sleep routine”, so it’s fine as long as I go to bed and to sleep when I get home.
  • If I am not at home (e.g. I’m being social somewhere) I don’t have to drop everything. Instead I am allowed to gracefully finish what I am doing.
  • I can decide in advance (say 24 hours at least) that I don’t have to go to sleep at a specific time. I usually do this for social events.

The nice thing about these rules is that I can honor them while staying up late according to one of the exceptions, so I don’t break the streak. I don’t have to be in bed by midnight either, I usually just have to stop what I am doing (immediately) and go to bed, which I can typically do in about 10 minutes, so it’s close enough.

Midnight is just an upper limit I chose. In general I would like to go to sleep earlier, but I also want my bedtime to be fairly regular and I didn’t want to use the exceptions too often, so I chose a time that is late enough that I don’t usually have a good reason to stay up later than that. As we can see from my sleep pattern in the image linked above, going to bed at midnight is clearly better than what I do by default.

Following these rules can be really hard for me if I am doing something that I feel is really interesting, but for a long period of time I was able to do it by reminding myself that if I really cared about what I was doing, I could just continue it tomorrow, and tomorrow would come faster by sleeping. These rules say nothing about waking up, so if I want to I can just wake up early and do whatever I want. It also helped that having a regular bedtime made it easier for me to fall asleep fast.

What is allowed and what isn’t is usually clear to me, when I just consider my initial reasons for creating this system. My problem has been that I simply stopped following them. Now, motivated by this thread I am starting a new goal with a weekly rate of 7 where I get 1 point if I follow the rules and 0 points if I don’t:

1 Like

Ooh! I’d forgotten about Sleep as Android – my phone has been on its death throes for months and months and so I haven’t been able to try it out, but I just got a shiny phone, so thanks for reminding me about this!

1 Like

Thanks Jess! I like your second of setting the bedtime at the beginning of the day. I’m probably not akratic enough about sleeping that I need a longer horizon than that.

I’ve done the “do more getting in bed by midnight” type goal before, and it was good at cutting off the depth-first-search of the internet, but it wound up that I was often being incentivized the wrong way – I’d eat up any safety buffer by accidentally missing my bedtime on nights with nothing happening, and then I’d either pay money or turn down friends when it came to opportunities to socialize.


I don’t beemind bedtime as such, but I mind how much I sleep using the FitBit connection. This doesn’t directly say when I should get to bed, but since I usually wake up before 7 (either via alarm or kids), I know that I have to get to bed reasonable early to reach my goals (which aren’t onerous, but better than how much I used to sleep).

If the goal is to get more sleep, I would recommend working on your wake up time instead of your bed time. You can control what time you go to bed, but you can’t directly control when you fall asleep. Going to bed early does not necessarily result in more sleep - in fact, I often find the opposite to be true. If you’re not tired, you’re not going to sleep, no matter how early you go to bed!

While you can’t control when you go to sleep, you CAN directly control what time you get up each morning. If you consistently get up at the same time every morning, no matter how much sleep you do or don’t get, your body will have no choice but to adapt. If this results in you getting less sleep than usual, then your body will adapt by getting tired earlier, which will lead to you getting more sleep. This will continue until you establish your body’s natural sleep pattern (I think this notion was put into my head by a Steve Pavlina post, so credit to him if I’m remembering correctly).

My second thought is that I would pay attention to the things that cause you to get tired, which in turn impacts your sleep. Look at the things that MAKE you get tired (hard work during the day, plenty of exercise, etc), and do more of those things. Also look at the things that PREVENT you from getting tired (overstimulation late at night, poor dietary choices, etc), and do less of those things.


Have you considered the possibility that you aren’t naturally wanting to go to bed due to too much blue light in your nighttime environment?

There’s good research that the blue light on screens significantly affects your melatonin levels.

Gwern has some great data on how installing an application that changes your computer’s color temperature had a strong effect on when he went to bed, here:

I just got these:

Great general advice! Not a problem in my case though. Going to sleep is a skill I excel at, it’s structuring the rest of my day so that I can go to sleep that’s the problem. :stuck_out_tongue:

1 Like

I am interested in figuring out how to beemind my bedtime as well.

I keep realizing that I have this pattern where there is a window of time around 10 p.m. where if I am in bed I feel sleepy and easily fall asleep, but if I wait until after 10.30 I get a second wind and end up not usually falling asleep until much later.

I use the Basis watch to beemind my deep sleep and REM sleep and I noticed that I get more deep sleep when I go to bed around 10 ( and I tend to go right into deep sleep) and I feel better in the morning, even with the same amount of sleep.

I might try the idea of beeminding time not asleep after 10 p.m. with a do less goal.

Does anyone have an app or device that allows you to get sleep data into beeminder without writing additional scripts?

1 Like

You can also use Lux to lower your phone’s brightness less than normally possible. It also allows you to lower the color temperature.

1 Like

Not directly about beeminding bed time – but definitely about how to manage bedtime…

A recent episode of the IProcrastinate Podcast covered Bedtime Procrastination. It’s kind of funny – since I’d already admitted to being 47 other kinds of procrastinator, but I’d never recognized how much I put off going to bed. I’m learning.

1 Like

Makes a lot of sense! The key for me for my own sleep schedule has been working backwards, trying to influence the behaviors/factors that influence the main behavior/outcome.

In this case, getting to sleep early enough is the main outcome. We put it at the root node. Then we ask, what are the factors that lead to this? Do I have a good amount of control over them? If we have a good amount of control over a first-order factor, then maybe we can Beemind that. If we don’t, then we can look at factors-of-factors until we find loci of sufficient control.

Now the bad news is this leads to an exponential number of things to manage. Naively putting all the factors-of-factors into Beeminder–not a good idea, even if you find a way to Beemind each of them.

Here is the good news: there is going to be asymmetry, both in impact and control. Probably a small proportion of the branches will be most important for shaping the target behavior/outcome. Probably a small proportion of the branches will contain things soundly in your control (or things that can be easily brought into your control with tech or help from friends/loved ones, etc.) Focusing on where impact and control overlap is a good place to start!