I have had a number of people close to me with serious mental health issues over time, including family. Given the prevalence of mental health issues that shouldn't be a surprise. But one thing I've noticed is that (anecdotally) they all have very poor sleep habits and/or trouble sleeping. While I don't have a good handle on cause/effect there obviously, it seems like lack of sleep and rest for the brain could be a precursor to mental illness. That potentially ties in with social media, as I wonder how many folks are checking facebook/instagram on their phones in bed instead of sleeping...
There is also recently published scientific papers alleging that the brains connection to the lymphatic system is much more efficient during certain types of sleep. It doesn't seem like a huge stretch to me to imagine that insufficient sleep (and thus the brain not clearing all its waste) could eventually cause problems with the brain on a biological level. I linked one study which has full text available.
https://www.karger.com/Article/FullText/490349