Recent studies have shown that light at night significantly affects melatonin production, and thus our ability to sleep well. Melatonin is secreted by the pineal gland and is a strong regulator of the sleep-wake cycle. Its secretion is regulated by information conveyed to the brain from cells in the retina that are sensitive to light, even when we are asleep.
The result of being exposed to light at night is a disruption not only to sleep patterns, but also mood. In a recent study, hampsters exposed to blue and white light were found to exhibit more depressive behaviours. Blue and white light is the kind typically given out by LED backlit devices (TV’s, computer screens etc).
As the amount of light we are subjected to directly affects melatonin production (and therefore how tired we feel and how well we sleep), watching TV in bed is not a good idea. The best environment for sleep is one that is completely dark and relatively free from electromagnetic radiation. Phones and all other electrical appliances should be turned off in the bedroom.
 Steven Dubovsky, et al. Can Watching TV at Night Affect Your Mood? J Neurosci 2013 Aug 7; 33:13081