Simple Tips and Tools for Three Common Sleep Disorders


The Emberify blog has some tips for dealing with three major sleep disorders.

  • Insomnia – evening exercise, low carb diet, reduce caffeine
  • Hypnagogic Jerks – stretch before bed
  • REM Sleep – avoid alcohol, take magnesium, calcium, vitamin C or iron.

Via Emberify Blog:

The Quantified Self is all about maintaining a healthy lifestyle, while at the same time keeping track of all the parameters and inputs which affect the lifestyle. While fitness is definitely the most important parameter to track and lifelog about, another key facet to record comes in the form of sleep, and tracking the hours/quality of sleep.

Now while we have spoken quite extensively about the types of sleep trackers out there, and the methodologies involved in tracking sleep, we haven’t really spoken about how sleep disorders may be addressed by the Quantified Self. Be it simple things such as insomnia, or more complex disorders such as sleep apnoea, there’s a cure to it all, and it comes in the form of sleep tracking. Since I am a good sleeper, I use Instant to track basic sleep duration, since it’s automatic.

And that shall be the crux of this article: Through some of my own experiments, and the knowledge gathered through a fair amount of research, I try to decode some common sleep disorders and work out the relation with sleep tracking.

specific direction. The intensity levels vary, and they might be startling, to hands-down frightening.

Hypnagogic jerks, or even hypnic jerks, are most commonly associated with the sensation of falling. It wakes some people up at night, and renders it difficult for them to sleep again for some time.


We know the background. The inability to sleep properly in night, a persistent feeling of restlessness which makes you toss and turn. And this in turn leads to lethargy during normal hours of functioning and reduced efficiency too.

Insomnia might seem the most harmless disorder, but it has some far reaching implications. As they say, a restful mind resides in a restful body. And insomnia essentially distorts sleep cycles and reduces hours of sleep.


Insomnia was something I experienced myself, and after constant tracking of the parameters which paved the way for a good night’s sleep, here are some of the methodologies which worked for me.

First off, physical activity. My routine entails me to return home at about 8:00 p.m from my day job, and I make it a point to go through some cardio based exercises – come what may. I find skipping to be an intensive exercise, so I skip for about half an hour and then go through some light weight training. An hour’s worth of exercise, and I’m guaranteed to have a restful sleep.

Secondly, a change in diet. I cut down on carbs quite a bit – since my blood glucose levels tend to shoot up quite a bit. But before I go to sleep, I make sure to eat a small fruit, preferably a mango or an apple. What this does is increase my glucose levels to just the right amounts, to ensure I can sleep well.

Other changes in diet might include avoiding tea, coffee or chocolate before going to bed, and including a glass of warm milk. But the quantified approach would be to measure the fitness regimes and push them in at a time when the body can go to bed tired, drained of energy.

Only then can it wake up renewed and refreshed, ready for the day ahead!


What happens in a hypnic jerk is this: the muscles which were taut and tightened for some time suddenly come to a state of rest and loosen up. Think of a state of motion or activity, and coming to a state of rest suddenly.

So, to avoid the jerks and twitches: stretch before going to bed. It’s like before and after a workout – the pre and post workout exercises are focused on toning the muscles, transitioning them from states of rest to states of activity. When you’re awake, your muscles are in states of activity, and sometimes it may be difficult for them to transition seamlessly to the state of rest.

Long stretches – involving touching of toes and reaching to the sky – along with some light lunges and half squats should do the trick. These exercises should be as comfortable as possible – overexertion and you’ll fool your body into believing you’re going for a run.


Among the three disorders I’ve spoken about, this one is the most advanced and complex. REM sleep disorder consists of episodes that are caused by vivid dreams during the REM sleep phase. The episodes comprise of physical activity and increased body energy, even in a state of sleep.


People experiencing this disorder have varying effects – at the minor levels, it can be limited to talking in the sleep, but in more advanced levels it would comprise of shouting, walking, flailing and even punching in sleep.


First things first, this sleep disorder is a very serious one, and must be combated with the help of a medical professional, since REM sleep can sometimes be the precursor / indicator for other diseases such as Parkinson’s.


That being said, keeping a track of some vital parameters can help in correcting the disorder. The rigorous maintenance of a normal sleeping time, combined with the avoidance of certain medications and alcohol, can make things better. The doctors might also ask you to incorporate magnesium, calcium, vitamin C or iron in the diet.


An outlandish mechanism for improving sleep patterns is to break down one long phase of sleep into multiple smaller forms. This reduces the hours spent in sleeping, while at the same time ensuring that the body gets adequate rests.


But more fruitful and proven mechanisms include meditation through yoga – a fact which we’ve spoken about when we explored the relation between Quantified Self and spirituality – and maintaining a healthy mindset, possible through mood tracking. Following good sleep hygiene, general cleanliness, and incorporating light fitness regimes before going to sleep.

Sleep, like all other parameters, is a measurable phenomenon. It can be improved upon by keeping an eye on all the other vital parameters – including diet, fitness and mental state. Improving upon sleep patterns in turn improves the overall quality of life, and therefore betters the Quantified Self.

Adafruit publishes a wide range of writing and video content, including interviews and reporting on the maker market and the wider technology world. Our standards page is intended as a guide to best practices that Adafruit uses, as well as an outline of the ethical standards Adafruit aspires to. While Adafruit is not an independent journalistic institution, Adafruit strives to be a fair, informative, and positive voice within the community – check it out here:

Join Adafruit on Mastodon

Adafruit is on Mastodon, join in!

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on, jump into CircuitPython to learn Python and hardware together, TinyGO, or even use the Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for CircuitPython, MakeCode, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

Have an amazing project to share? The Electronics Show and Tell is every Wednesday at 7pm ET! To join, head over to YouTube and check out the show’s live chat – we’ll post the link there.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Join over 36,000+ makers on Adafruit’s Discord channels and be part of the community!

CircuitPython – The easiest way to program microcontrollers –

Maker Business — “Packaging” chips in the US

Wearables — Enclosures help fight body humidity in costumes

Electronics — Transformers: More than meets the eye!

Python for Microcontrollers — Python on Microcontrollers Newsletter: Silicon Labs introduces CircuitPython support, and more! #CircuitPython #Python #micropython @ThePSF @Raspberry_Pi

Adafruit IoT Monthly — Guardian Robot, Weather-wise Umbrella Stand, and more!

Microsoft MakeCode — MakeCode Thank You!

EYE on NPI — Maxim’s Himalaya uSLIC Step-Down Power Module #EyeOnNPI @maximintegrated @digikey

New Products – Adafruit Industries – Makers, hackers, artists, designers and engineers! — #NewProds 7/19/23 Feat. Adafruit Matrix Portal S3 CircuitPython Powered Internet Display!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at !

No Comments

No comments yet.

Sorry, the comment form is closed at this time.