↑ Return to Better Mood Tracker

Better Mood Tracker – Understanding your sleep data

Understanding your sleep data.

Better mood tracker may collect quite a lot of data about your sleep, that may be intimidating to first time users. Don’t worry, I will walk you through everything you need to know to sleep like a pro.

Every night you sleep with Better Mood Tracker in “Sleep Tracker” mode, you add more information about your sleep to your history. As you get 20 days or so of history, you will be able to see patterns in your sleep, or maybe your doctor will.

What are all these abbreviations? Here’s what they stand for, with more detailed discussion to follow.

3 Days of sleep data - regular night sleep, followed by a daytime nap with sleep metrics collected by sleep tracker.

  • SOL = Sleep Onset Latency is how long it took you to fall asleep
  • TST = Total Sleep Time, the total number of minutes.
  • TTIB = Total Time In Bed or how long you spent laying in bed (both asleep and not).
  • AW = number of intermittent AWakenings that were detected after sleep onset
  • SQ = Sleep Quality, a ratio of Total Sleep Time to Total Time in Bed.
  • MBM – Major Body Movements, number of 5 second intervals, when major body movement (like turning to a different side) was detected
  • SBM – Small Body Movements, number of 5 second intervals, when a small body movement (like moving an arm or a leg) was detected.

You will frequently find similar terms if you read about sleep studies, and if you tell these metrics to your sleep doctor, he/she will understand what you are talking about. I keep abbreviations consistent, so you can compare your own results to others.

In the image to the right, I show 3 days of sleep metrics, each day having a regular night sleep episode and a daytime nap. The rest of the article would refer to these 6 episodes of sleep to explain how the app works.

For example, for 2 out of 3 days, I went to bed very late, was tired, but was unable to fall asleep. This is indicated by very high Sleep Onset Latency value. Typically, sleep onset times are under 30 minutes, with shorter SOL meaning you are more sleep deprived

The Total Sleep Time figure will vary based on the number of “certain” sleep that the app detects. This is done by comparing activity detected each minute against a sleep scoring algorithm, that is well established in the field of sleep studies. Certain sleep involves both deep and light sleep.

AWakenings number  indicates the number of significant movements that broke otherwise uninterrupted sleep episodes. If you sleep deeper, it is expected that you will see smaller AW number.  You may remember awakenings to go to the bathroom, or mark your dreams, but shorter awakenings to reposition the body are typically forgotten instantly.

Each night you track your sleep, the app adds sleep statistics to your history, so you can see how restful/restless sleep affects your moods and performance

Major Body Movements and Small Body Movements – This figure is displayed on the History tab, if you scroll your history table all the way to the left. There have been studies done that indicate that connect Serotonin to motor activity and you may know that Serotonin is at least partially connected to your wellbeing. I do not know if SBM or MBM figure will show any useful information about your Serotonin system, but I’m intrigued by the possibilities.







Your sleep cycle graph

Sleep cycle graph shows deep and light sleep, dreams and the time that it took to fall asleep

There are many sleep trackers out there, quite a lot of them feature some form of a graph to prove to you that they really do collect data over night. My app is no exception, and I use the data collected overnight to plot and color code a sleep graph for you.  The major difference between this sleep cycle graph and other graphs is that  the graph in Better Mood Tracker shows user events on the sleep cycle graph. You can use these to verify if the graph is accurate for you or not.

Here’s how to read the graph:

  • The Green Moon icon is bedtime – when sleep tracking started
  • The Pink Star icon is sleep onset – when the first lightest stage of sleep was detected
  • Each vertical bar in the graph is 5 minutes wide.
  • The number of gray bars between the moon icon and the star icon is how long it took you to fall asleep. In the example to the right, it took 28 minutes, or 6 bars to fall asleep.
  • On the graph to the right, dark green bars indicate deepening sleep.
  • Maximum sleep depth at night is the deepest valley on the graph.
  • Following deep sleep come light sleep stages again – these are indicated by light green and gray bars.
  • Blue bars is when the app thinks you are dreaming.
  • The green star marker stands for a dream – it is a marker that I added myself to the graph after awakening at night.
  • The app thought that I was dreaming at ~6.37 and I reported a dream awakening at 7:02\
  • After waking up at night, it takes some time to go back to sleep. In such case, the app places additional sleep onset marker to indicate how long it took to fall asleep after awakening in the middle of the night.

Now what do all these things mean? Humans sleep in something called “Sleep Cycle” – it is a pattern of ~90 minute activity that is observed over the course of the night. The white arches under the graph are exactly 90 minutes wide, and are provided for your reference.  The app attempts to graph these cycles for you, based on the movement observed over night. See, as you go into deeper sleep, you stop moving, while as you get ready to awaken, you start to move more. By looking at the differences over long periods of time, the app can create such graphs. The entire “sleep cycle” repeats multiple times (typically 5-6) over the course of the night,a and awakening from deep sleep may contribute to sleep inertia – a feeling of grogginess and “uggggh…” where you don’t want to get out of bed, and in general feel like a zombie.

Let’s say you are experiencing insomnia, a condition that is unpleasant. Even if you try to lay still, you cannot lay still for long, because it is uncomfortable. You may feel ever increasing urge to move to a more comfortable position. The app, by monitoring your sleep over a long time detects these movements and indicates that you are awake by:

  • Drawing gray bars at the very left of the graph. This is the amount of time that it took you to fall asleep
  • Drawing light green bars higher in the middle of the night to indicate activity
  • Calculating and placing Pink sleep onset markers to indicate how long it took you to leave insomnia and fall asleep.

Personally, I’ve always been concerned about insomnia. Laying in bed, with obligations due next day, and unable to fall asleep is hellish. I remember looking at the clock and looking at hours drag by. But by looking at the actual sleep onset times, my anxiety about insomnia was eliminated! I know that while I ‘m unable to fall asleep, it is only a fraction of the night that I’m losing (I recorded up to 95 minutes of insomnia). This means I no longer look at the clock, and drift off easier, because anxiety is gone, meaning higher quality of sleep.

What’s the red line for? The red line separates “certain” sleep from “uncertain sleep” – anything above the red line can be dreaming or wakefulness. It’s hard to tell, as the human brain can be as active during dreams, as during wakefulness. This is why dreaming markers are helpful – if you put one on your data, you can confirm that you have been dreaming before that time. Insomnia markers (green eye) can help you manually identify that you’ve been awake for some time.

Your sleep history – illustrated.

My sleep over a few nights. Moon markers are bedtimes, pink markers are sleep onset, and sun markers are morning awakenings.

Better Mood Tracker is an extension of my previous work on sleep tracking. I spent over 9 months tracking my sleep every night, and can discuss some very interesting patterns that I noticed over that time. I investigated various causes, but found that more information is required to be able to draw conclusions about the effect of sleep on mood. The result is Better Mood Tracker – an app that combines sleep history with daytime event tracking.

Let me discuss the image to the right, which is an example of  5 days of sleep history, as I was developing the app.

To refresh your memory:

  • Green circle with a moon icon is bedtime
  • Pink circle with a star is sleep onset
  • Green circle with a sun is morning risetime.
  • There are dream markers (green star medal) and insomnia (green eye)

These are the days when I was developing the app. Typically, I work from midnight to 3:00, with two monitors on. I went to sleep somewhere between 3:30-4:00AM and woke up some time between 10 and 12. This is a very poor sleeping pattern – it ignores the requirement that my lowest body temperature occur after the middle of the sleep episode, and in general would account for the very long times that it takes me to fall asleep and poor sleep quality. But I have to get the app out!

By looking at Pink stars of sleep onset, you see that I’m losing a lot of time due to being unable to fall asleep quickly enough.

I report dreamsat more or less regular intervals. It is typical for me to report a dream after 3-4 hours past bedtime, following an episode of deepest sleep. In the example above, I report dreams at 6:00AM, 6:30 AM and 7:00 AM. Because dreaming occurs at the end of a sleep cycle, dream markers help me better estimate sleep cycles experienced during that night.

Notice that the awakening marker is placed when I stop sleep tracking in the morning. this has occured consistently between 10:40 and 11:40. This is when my body feels like it has had enough sleep, and I can get out of bed. White knife/fork icon indicates when I eat the morning meal ( and drink green tea). Notice that changing the awakening time changes the meal time too! And the meal time is a signal to the digestive system about time of the day. Thus changing one thing about sleep, like timing or duration has additional effects that propagate further down the chain of your organ systems, potentially adjusting their biological clocks from what they are supposed to be.

One of the major advantages of the Better Mood Tracker is that it allows for tracking of naps too!

My nap history over several days. Leftmost green marker is morning awakening. Moon markers indicate when nap started, rightmost sun marker indicates awakening from nap.

Due to my low sleep quality, I feel a strong urge to sleep in the afternoon, typically 1 hour after a meal or so. I tried “working through” this, but end up feeling terrible, while after a nap like that I feel very good.

The naps can be seen on the image to the right, they are about 2 hour in duration, and occur between 16:00 (4PM) and 19:00 (7PM). An interesting thing about these naps is that they feel totally different from the night time sleep. While I toss and turn for close to 60 minutes during regular nighttime sleep, I can lay down and spend 2 hours in the same position during an afternoon nap. Following awakening from such nap, my muscles feel warm, my body temperature is higher, and my eyes are bloodshot. But I feel calm and good!

The sleep onset of such naps is also remarkably shorter than my regular bedtime nap, about 3 times shorter, and it often falls within the “normal” Sleep Onset range.


The cool thing about Better Mood Tracker is that you can filter certain events out and show/hide them on the graph. For example, I left the afternoon walks (red walking icon) on the example to the right to show that I did walk on 3 days of the week, while working in the afternoon on the remaining two days.


My Day and the Biological clock.

Your body has multiple time-keeping systems that are independent of each other, but are kept “in sync” by your body. It is believed that the “master clock” of your body, called Suprachiasmic Nucleus (SCN) is receiving information through your eyes about the amount of blue light in the environment. Blue light, in the 1000 lumen range, hitting the retina would indicate that it is day. And your biological clock would be “entrained” to the day duration, telling your body when to hunt, when to digest food and when to sleep.

But the modern world has changed the equation in a course of 20-30 years – we have pervasive LCD displays all around us, and some TVs are bigger than ourselves. All of these devices shine a lot of light that may confuse our internal clocks.  As I program the app, I sit in front of 2 large monitors, which expose my retina to extended periods of light. And guess what is the most popular color among humans? Blue! What color are major interface components of my development software? Blue! What color are buttons and hyperlinks in on my screen as I write this post? Blue!

My Day plots my sleep and other actions against natural sunlight window (day duration)

While blue is a great color during the day, exposure to too much blue may negatively affects my ability to fall asleep, by pushing my bedtime further and increasing my sleep onset latency. On nights when I do not program I got to bed earlier, and fall asleep faster.

To help you understand what may be driving your SCN and your biolgical clocks, I developed a special clock which I put in the Better Mood Tracker. It is a 24 hour dial that has sunrise/sunset markers.

The idea is fairly simple – based on your location and time of the year, I can calculate when the sun will rise and set at your location. This information is represented by two triangular arrows in the image to the right.

  • Left arrow indicates sunrise (in this case 7:40 AM)
  • Right Arrow indicates sunset (18:00 or 6:00PM)
  • Above the arrows is natural sunlight (10 hours and 20 minutes)
  • Below the arrows is natural darkness, and artificial light (13 hours and 40 minutes)
  • My bedtimes (sleep and nap) are marked with green moon markers
  • My awakenings (sleep and nap) are marked with green sun icon.

This clock conveys a lot of very interesting infromation about my lifestyle. For example, The midpoint of my sleep coincides with sunrise and sunset, and my day is divided in two distinct sections – shorter morning session, where I’m less productive, and longer afternoon-night session that has two productive episodes.

Information can be added or removed from My day view by using the Filter button. For example I can add

My day with pink sleep onset markers indicating how much time I spent trying to fall asleep

The same day with weather and meals/snacks reported








My nap history over several days. Leftmost green marker is morning awakening. Moon markers indicate when nap started, rightmost sun marker indicates awakening from nap.