The ubiquitous adoption of electronics the modern world has demanded out of its denizens has made it so we as a society spend more time than ever before with our eyes fixated on the comings and goings of the pixels in our screens.
Much attention has been drawn to this phenomenon and the health consequences it has brought and may yet bring.
Besides encouraging a sedentary lifestyle, one of the most noticeable trends among the population has been the significant and steady rise of insomnia and other sleep disorders.
People are having a hard time going to bed, and, due to their particularly heavy use of screens, gamers from all over the world should take special care when handling this crucial aspect of their well-being.
Either by displacement of sleep or by its lack, the problem has the potential to ruin lives. Do not leave it unattended.
A 2016 paper presented at a specialized annual sleep conference found that over two-thirds of surveyed videogame users frequently delayed their bedtime by around 100 minutes so they could keep playing; 40% of them also admitted to being late on their duties because of it. 
In this post we will provide a basic explanation of potential common causes along with some solutions to sleep disorders.
Although the methods proposed are useful and safe, the list is not exhaustive.
It is therefore recommended that the reader consult a specialized medical practitioner should sleeping issues persist.
Identification of common causes for bad sleep
Blue light and light sources in general
Aside from the sun, technology emits artificial light at different wavelengths and frequencies.
Seeing as we depend on its use, we are constantly bombarded with rays that modulate our alertness and displace normal circadian rhythms well past daytime.
While not the only light to controls alertness, blue light in particular (with a short wavelength and a high frequency) has consistently been proven as a source which negatively suppresses endogenous secretion of melatonin from the pineal gland, a key sedative hormone of the sleep cycle. 
Blue light is notably common in LEDs, fluorescent lights and screens.
Levels of high brightness from the room or certain items at night, such as phones, are sure to alter melatonin production, and thus our ability to fall asleep.
The above is usually the reason why it is not recommended to interact with technology and bright lights for at least one hour before going to bed, as doing so will discourage the body from entering a state of relaxation.
However, a lot of people simply are unwilling to not browse a screen before heading off to sleep, so methods such as melatonin supplementation or using blue-light-blocking glasses may be considered.
Directly-applied screen filters are also somewhat heard of, but far rarer.
You can find more information about these further below.
With limitations as to overall conclusions, a growing body of medical evidence suggests there is a strong link between intestinal microbiota (organisms such as bacteria), mental health and mood. 
Gut biome diversity and composition can shift depending on the nutrients it receives. 
Also, individuals who are sleep deprived are prone to eating a higher amount of calories (usually from binge eating fats or carbohydrates/sugars —especially refined ones— commonly found in chips and snacks) than those that do not.   
The net-positive energy intake from overeating is likely to promote weight gain and endocrine hormonal imbalances which will viciously influence both sleep quality and duration; and, by themselves, high-fat, high-carb and low-fiber intakes seemingly interact differently and often negatively with sleep phases.  
Gamers are often tied to a chair near their computer and console. They are encouraged to take a passive stance towards diet and exercise, and for reasons of convenience they may end up accustomed to craving same-style addictive foods that are high in carbohydrates and saturated fats while disdaining vitamin, protein and fiber-rich ingredients.
If you tick any boxes in the above you may benefit from implementing changes to your diet by actively tracking your macronutrient intake, avoiding certain foods and making sure you get enough vegetables, fruits, healthy fats and proteins; these are also quite better at promoting satiety and leave the user fuller.
If you are fan of Doritos or potato chips and believe you are going to have struggles with snacking, a delicious food which has a surprisingly small amount of calories is plain air-popped popcorn.
High in fiber and protein and low in fat and added sugars, plain popcorn is by far one of the best things one can binge eat in big quantities, ever.
A sizeable serving of 50 grams will just have around 190 calories.
Caffeine, sugar and energy drinks
Caffeine is used as a stimulant; it promotes wakefulness in the brain by blocking adenosine receptors, which slow down brain activity, and increases heart rate.
Therefore caffeine can interfere with those intending to sleep.
The maximum recommended daily dose of caffeine for a normal adult is 400 milligrams.
Refined or single sugars are simple carbohydrates that digest rapidly into the bloodstream. Single sugars are now known for their adverse effects on health by increasing the risk of metabolic conditions such as diabetes or liver, kidney and heart disease, among others.
Processed food and beverage manufacturers often add sugar to their industrial formulas because of its tasty, sweet and alleged addictive properties;  the latter quality being somewhat contested in the clinical literature. 
Regardless, the American Health Association does not recommend that consumption of added sugars go over 36 grams per day for an adult male and 25 grams for a female. 
It is no secret that soft-drink companies have successfully carved their space in gaming.
Most notably, the esports industry owes a lot of its success to sponsorships made by energy drinks like Red Bull.
While energy drinks have been at the receiving end of several criticisms stemming from people who would consume way worse, valid arguments can be raised regarding the potential abuse of energy drinks amongst gamers and young people in general.
Just the caffeine content in a single can of most of these products approaches the maximum recommended daily dose for an adult; when it comes to adolescents, caffeine can impact the sleep that is vital to their brain development. 
Combined with sugar, soft drink consumption can most assuredly produce a negative outcome when it comes to the health and sleep discipline of a person.
It is because of this that consumption of sweet and energy drinks with sugar is not really recommended, and that still with plenty of delicious no-sugar options available consumption be relegated to periods as far away as possible from bedtime.
Certain people might complain about the taste or the very idea of it, but Zero caffeine and Zero sugar Coke is a viable alternative since it fulfills the criterion for someone looking to drink something other than water which at the same time does not keep them awake at night
Single-player vs multiplayer games
Here we get into territory that is more conjecture than actual proven science.
Gaming´s relation with sleep was a relatively unexplored field until fairly recently, and investigators have yet to perform serious studies that compare whether there are substantial differences between having a more casual and laid back single-player experience in contrast to a multiplayer one.
Let us not kid ourselves: online gaming can get competitive and emotions do run high; voice chats from CSGO and text chats from League of Legends can attest to that.
A lot of gaming is too done after dusk, so it is important for the sleep-deprived user to consider whether playing potentially stressful games is going to help.
Expressly for students not constrained to time limitations and an exhausting job, it may be possible for them to play in the evening rather than at night.
Still, when playing multiplayer titles most are looking forward to doing so with friends, and at times it can be challenging to coordinate timing with colleagues.
Nevertheless, the choice of playing at a different time, playing non-social games or not playing at all should be at least considered for the severely affected patients.
Over the course of an individual´s life circadian rhythm may naturally evolve.
Assessing what chronotype a user belongs to may be a good activity for understanding better what one´s interaction with sleep is.
There are multiple chronotype questionnaires on the web that a user may answer. You can find one here.
At the very least, answering such a test will make the user reflect in an organized manner about sleep, something that a surprising amount of people will not do on their own even when finding themselves affected.
The results and questions can be then annotated and brought to a specialist so they can better assess the health status of the individual.
Solutions to sleep problems
One of the most popular solutions is also one of the most effective at first.
Over-the-counter melatonin products are usually the go-to option in countries where they are available.
More often used for displaced circadian rhythm conditions such as jet lag, as a hormone naturally produced by humans melatonin acts like a mild sedative which causes the sensation we associate with sleepiness.
Consumption of melatonin has been deemed as safe except for pregnant and breast-feeding women.
Dosages typically range from 0.5 milligrams to 10 milligrams 30-60 minutes before bedtime, yet quantities substantially higher for extended periods of time have been registered. 
Extreme amounts in the short-term are also considered safe. 
Experimentation with melatonin is required as to adjust to the particular metabolism of the user.
One thing melatonin consumers should know, however, is that the consequences of long-term exogenous usage are not very well understood, and some scientists have theorized that, while possibly safe, it may incite the pineal gland to decrease endogenous secretion of the hormone. On the short-term, melatonin has been known not to cause such effect. 
Compared to other chemical compounds prescribed by doctors, the side effects of melatonin are mild.
For example, morning drowsiness and even headaches are sometimes reported; another curious side effect are the infamous “melatonin dreams” for first-time users.
People online, the writer of this post included, often report that initial tries with melatonin bring weird (but not necessarily unpleasant) dreams.
Available melatonin formats
Melatonin is most commonly taken in a tablet format. It also tends to come in a gummy and a liquid format.
Versions of extended and immediate-release formulas exist, and it is quite possible that in the future extended release becomes the industry standard, as it seems to provide a more lasting and better sleep.
Some people report immediate-release versions of melatonin being less effective due to waking up after around four to five hours. I would anecdotically agree.
Others also like to consume a mix of tablets; the underlying logic being that they will digest at different rates.
A few additionally place a melatonin gummy sublingually so the release is even more prolonged.
Whatever the case, experimentation with different brands should be expected.
Here is a list for you to browse and buy if you are interested.
Blue light glasses
Glasses that filter blue light from screens are a common remedy for users who spend a lot of time on the computer, either for improving sleep or resting the eyes.
The yellower the lens of the glass the more blue light it is meant to filter. When worn this results in the colors of the screen looking much different than normal; it is a little bit hard to get used to at first, but worth it for users with serious sleeping issues.
Do not dismiss this alternative just because of the coloring. But if it indeed poses a big problem to the user, manufacturers offer versions with less amber coloring at the cost of having a weaker filter.
An independent randomized trial from 2009 investigated the supposed effectiveness of amber glasses in a very small sample of individuals.
While acknowledging the potential limitations of their study (which, better be mentioned, were not minor), the researchers found that after a period of two weeks the treatment group of sleep deprived individuals reported better mood levels and quality of sleep than those of the control group, which had been given a placebo. They both had been wearing the real amber colored glasses for three hours prior to sleep (filtered versus non filtered). 
A similar study was performed in 2016, with measurements performed through an actigraph device. Results were again positive. 
An even more thorough study conducted in 2018 amongst athletes (most of which were female) reported similar positive results when it came to the subjective sleep quality, morning wakefulness and mood reported by the treated individuals. 
With the theoretical backing of science behind and some experimental evidence, blue light filtering glasses seem like an attractive solution for individuals looking to improve their sleep and, by consequence, their mood.
Practice proper sleep hygiene
Even when melatonin and filtering glasses are viable solutions to certain sleeping issues, success will most certainly rely upon the active involvement of the individual in improving his/her sleep surroundings.
Anyone looking to improve sleep quality, even a gamer, should take conscious efforts in avoiding smartphone, computer and television use before heading off to sleep.
Needless to say, developing a rigid, disciplined schedule is a must; while naps, even when tempting, should be kept to a minimum.
The room to sleep in must ideally be dark, and its noise practically nonexistent. Earplugs for the latter aspect can be used.
Seek medical help
Ultimately, the list of sleep disorders is too varied to cover in a mere website article, so it is strongly encouraged to consult with a specialized medical practitioner.
Come well prepared for the consultation, though, as practitioners cannot always easily infer what kind of disorder the patient may be facing.
Be ready as well to seek a second opinion, as sometimes sleep doctors and psychiatrists may prescribe medications which are not the best for the patient´s particular needs.
If prescribed medication, be quickly to log and report effects and sensations produced along with the corresponding time, duration and quality of sleep experimented. Certain compounds build tolerance over time and may need to be cycled.
Overall, be ready and proactive when it comes to taking care of your sleep.
Bibliography and references
 Roane BM, Morrisey K, Fernando S. Gaming the night away: a look at videogamers and their bedtimes. Journal of Sleep and Sleep disorders research. 2016;39:67. https://academic.oup.com/DocumentLibrary/SLEEP/2016AbstractSupplement.pdf#page=67%E2%80%B3
 Figueiro, M.G., Bierman, A., Plitnick, B. et al. Preliminary evidence that both blue and red light can induce alertness at night. BMC Neurosci 10, 105 (2009). https://doi.org/10.1186/1471-2202-10-105
 Smith RP, Easson C, Lyle SM, et al. Gut microbiome diversity is associated with sleep physiology in humans. PLoS One. 2019;14(10):e0222394. Published 2019 Oct 7. doi:10.1371/journal.pone.0222394
 Singh RK, Chang HW, Yan D, et al. Influence of diet on the gut microbiome and implications for human health. J Transl Med. 2017;15(1):73. Published 2017 Apr 8. doi:10.1186/s12967-017-1175-y
 Weiss A, Xu F, Storfer-Isser A, Thomas A, Ievers-Landis CE, Redline S. The association of sleep duration with adolescents’ fat and carbohydrate consumption. Sleep. 2010;33(9):1201-1209. doi:10.1093/sleep/33.9.1201
 Grandner MA, Kripke DF, Naidoo N, Langer RD. Relationships among dietary nutrients and subjective sleep, objective sleep, and napping in women. Sleep Med. 2010;11(2):180-184. doi:10.1016/j.sleep.2009.07.014
 Al Khatib, H., Harding, S., Darzi, J. et al. The effects of partial sleep deprivation on energy balance: a systematic review and meta-analysis. Eur J Clin Nutr 71, 614–624 (2017). https://doi.org/10.1038/ejcn.2016.201
 St-Onge MP, Mikic A, Pietrolungo CE. Effects of Diet on Sleep Quality. Adv Nutr. 2016;7(5):938-949. Published 2016 Sep 15. doi:10.3945/an.116.012336
 St-Onge MP, Roberts A, Shechter A, Choudhury AR. Fiber and Saturated Fat Are Associated with Sleep Arousals and Slow Wave Sleep. J Clin Sleep Med. 2016 Jan;12(1):19-24. doi: 10.5664/jcsm.5384. PMID: 26156950; PMCID: PMC4702189.
 Luppino FS, de Wit LM, Bouvy PF, et al. Overweight, Obesity, and Depression: A Systematic Review and Meta-analysis of Longitudinal Studies. Arch Gen Psychiatry. 2010; 67(3):220–229.
 Crispim CA, Zimberg IZ, dos Reis BG, Diniz RM, Tufik S, de Mello MT. Relationship between food intake and sleep pattern in healthy individuals. J Clin Sleep Med. 2011 Dec 15;7(6):659-64. doi: 10.5664/jcsm.1476. PMID: 22171206; PMCID: PMC3227713.
 Avena NM, Rada P, Hoebel BG. Evidence for sugar addiction: behavioral and neurochemical effects of intermittent, excessive sugar intake. Neurosci Biobehav Rev. 2008;32(1):20-39. doi:10.1016/j.neubiorev.2007.04.019
 Westwater ML, Fletcher PC, Ziauddeen H. Sugar addiction: the state of the science. Eur J Nutr. 2016;55(Suppl 2):55-69. doi:10.1007/s00394-016-1229-6
 Sampasa-Kanyinga H. Hayley A. Hamilton, Jean-Philippe Chaput. Sleep duration and consumption of sugar-sweetened beverages and energy drinks among adolescents. Nutrition, Volume 48, 2018, Pages 77-81, ISSN 0899-9007, https://doi.org/10.1016/j.nut.2017.11.013. https://www.sciencedirect.com/science/article/pii/S0899900717302654
 Alan G. Wade, Gordon Crawford, Ian Ford, Alex McConnachie, Tali Nir, Moshe Laudon & Nava Zisapel(2011) Prolonged release melatonin in the treatment of primary insomnia: evaluation of the age cut-off for short- and long-term response, Current Medical Research and Opinion, 27:1, 87-98, DOI: 1185/03007995.2010.537317
 Andersen LP, Gögenur I, Rosenberg J, Reiter RJ. The Safety of Melatonin in Humans. Clin Drug Investig. 2016 Mar;36(3):169-75. doi: 10.1007/s40261-015-0368-5. PMID: 26692007.
 Matsumoto M, Sack RL, Blood ML, Lewy AJ. The amplitude of endogenous melatonin production is not affected by melatonin treatment in humans. J Pineal Res. 1997 Jan;22(1):42-4. doi: 10.1111/j.1600-079x.1997.tb00301.x. PMID: 9062869.
 Burkhart K, Phelps JR. Amber lenses to block blue light and improve sleep: a randomized trial. Chronobiol Int. 2009 Dec;26(8):1602-12. doi: 10.3109/07420520903523719. PMID: 20030543.
 Yuichi Esaki, Tsuyoshi Kitajima, Yasuhiro Ito, Shigefumi Koike, Yasumi Nakao, Akiko Tsuchiya, Marina Hirose & Nakao Iwata (2016) Wearing blue light-blocking glasses in the evening advances circadian rhythms in the patients with delayed sleep phase disorder: An open-label trial, Chronobiology International, 33:8, 1037-1044, DOI: 10.1080/07420528.2016.1194289
 Knufinke M, Fittkau-Koch L, Møst EIS, Kompier MAJ, Nieuwenhuys A. Restricting short-wavelength light in the evening to improve sleep in recreational athletes – A pilot study. Eur J Sport Sci. 2019 Jul;19(6):728-735. doi: 10.1080/17461391.2018.1544278. Epub 2018 Nov 14. PMID: 30427265.
Also available in: