If you like to get ready for bed by watching TV, texting friends on your phone, or playing games on your tablet, you’ve got company. Nine out of 10 Americans use some type of electronic device in the hour leading up to bedtime, according to a National Sleep Foundation (NSF) poll. Among adults younger than age 30, the number climbs to 96%. But even though you may love your gadgets, they might not love you back. Research shows some electronic devices can rob you of much-needed sleep if you use them too close to your bedtime. Your Brain on Gadgets Part of the problem is using technology interactively—for instance, playing a video or computer game, checking your email, or shopping online—is mentally stimulating. As a result, it can rev up your brain and body when you should be winding down. In the NSF poll, the more people used interactive devices in the hour before bedtime, the more likely they were to have trouble falling asleep or to wake up feeling unrefreshed. But don’t worry—you don’t have to banish all electronic devices at bedtime. Listening to music on a portable media player is a passive experience that doesn’t seem to interfere with sleep. In fact, there’s good evidence that listening to relaxing music at bedtime can be an effective sleep aid. The Dark Side of Light Watching a movie or TV show is a relatively passive process as well, but there’s a catch: The light from the screen may keep you awake. Electronic screens give off short-wavelength light. Studies have shown being exposed to this bright light in the evening can delay sleepiness. That’s because the light stimulates a nerve pathway that leads from your eyes to the parts of your brain that regulate how drowsy—or wide awake—you feel. Among other effects, the light may suppress the release of melatonin, a hormone that helps your body know when it’s time to go to sleep. In a study from Rensselaer Polytechnic Institute, melatonin levels were reduced by more than 20% in teens and young adults who used a tablet for two straight hours. That could potentially make it harder to doze off afterward. It’s worth noting that the tablets were set on the highest brightness level for the study. If you’re determined to bring your tablet, laptop, or smartphone to bed, the researchers recommend dimming the screen as much as possible and limiting how long you use it. Those Pesky Ringtones Once you fall asleep, your mobile phone might try to wake you repeatedly with ringtones and alert sounds. Surprisingly, a lot of people just put up with the noise. In the NSF poll, 20% of adults younger than age 30 said they were awakened by their phones at least a few nights per week. The best solution is to turn off the ringer completely. But if that isn’t feasible, you can still mute other alert sounds on your mobile phone, and shut off your tablet and laptop. With today’s gadgets, it’s easy to bring the outside world right into your bedroom—but that isn’t always the best thing when you’re trying to sleep. If you choose to keep your mobile phone, tablet, or laptop by your bed, make sure you control it instead of the other way around. Key Takeaways Some electronic devices can rob you of sleep if you use them too close to your bedtime. Using technology interactively, like playing a computer game or checking your email, is mentally stimulating, and that prevents your brain and body from winding down before sleep. The short-wavelength light from some electronic screens can delay sleepiness. If you have to use an electronic device in bed, dim the screen as much as possible and limit how long you use it.