Scientists have established that complete darkness is necessary to get adequate sleep. Even the slightest artificial sources of light, such as nighttime illumination, cause a decline in the production of melatonin, which results in the deterioration of sleep quality.
For example, a study in Japan conducted over four years with more than 800 elderly participants (https://academic.oup.com/aje/article-abstract/187/3/427/4056592?redirectedFrom=fulltext) has shown that even light sources of just 5 lux increase the risk of depressive symptoms developing in the individual! 5 lux is very little indeed, equal to the amount of light given off by the flame of one conventional candle placed about 1 meter away from the observer; for comparison, during the full moon at night the illumination on the surface of the earth is less than 1 lux.
Another study (https://www.ncbi.nlm.nih.gov/pubmed/22824811) has shown that the risk of the onset of depressive symptoms increases after just 4 weeks of exposure to 5 lux nighttime lighting.
For our ancestors, access to deep darkness was not a problem. Before electricity it really was dark at night. In those days there also were usually no toilets indoors, and at night they were replaced by a chamber pot that could be reached by feel.
But we are used to more comfort than our ancestors… and there is certainly too much electric light around us. In big cities night is almost as light as day.
And we are more afraid of the dark than our ancestors. This is a separate topic, and of course it is better to make friends with the dark, but… studies have actually shown that many people use lighting at night not because of their desire for convenience, but out of the fear of darkness.
Personally, I use a blindfold for sleep, of the type issued in an aircraft during night flights. An example can be seen in the picture above. I use it at home and take it with me on all of my trips.
It is very convenient. Once the blindfold is in front of your eyes – you’re in the dark. Move the blindfold – and you can see everything.
P.S. For those who still prefer to use the nightlight, scientists have found that red and orange light is less harmful than blue and white light. Lamps which give off light of the correct hue may be bought in various online stores.