The Mayo Clinic just came out with a new study about the effect of having a smartphone or an tablet (iPad, etc.) in your room with you when you’re trying to go to sleep. Basically, the light from the devices is too bright when set at the brightest level, and can interfere with your melatonin and thus keep you awake.
The best solution, of course, is simply to not have the device in your bedroom in the first place. I personally don’t check any email or anything like that for at least half an hour before turning in. Too much potential for bad news, or something work-related that will start me thinking and then make it harder to get to sleep.
But a lot of people use their devices as alarm clocks, and so can’t really do without. For them, the recommendation is to turn down the brightness setting to at low setting. Even if you’re just getting in a little reading before bedtime, there will be enough light coming from the device to allow you to read. And the potential for melatonin interference is far less.
Check out a more detailed summary of the study here.