According to this infographic, we should avoid self-luminous display (phones, tablets...) two hours before bed. Hope you're not living in Harajuku :).

 

how-technology-affects-sleep

 

Source