I don't doubt that poor sleep habits can contribute to depression and help bring on a bout of it all on its own. However, my experience is the opposite. Depression severely reduces my ability to sleep. What sleep I get is restless and filled with intrusive thoughts. In the internet age, it does not surprise me that many people in this situation would turn to internet usage in this situation to occupy their minds rather than lay miserably in the dark drifting in & out. With or without that internet activity, this becomes a downward spiral:
--depressed ∴ can't sleep.
--Sleep deprivation ∴ worsened depression
--worse depression ∴ worse sleep
I'm sure the often toxic nature of social media only makes this worse, and also that the short-term relief from inner ruminations through internet distractions also just makes the sleep deprivation worse as well if it leads to even less sleep.
When depression ∴ can't sleep (rather than the inverse, which also happens) is the causal chain, treating the symptoms of poor sleep or late-night internet usage won't help quite so much with the underlying cause: depression itself. But this article unfortunately seems to focus on that line of treatment, e.g., with CBT. However I do not mean to discount the information in this study: It demonstrates some very useful knowledge as well. I would simply have liked them to have explored the topic of whether late-night activity preceded depression or not. Although early warning signs can progress slowly & subtly to the point where it may not always be clear.