A few weeks ago I identified doomscrolling, particularly in bed, as a major source for my recent sleeping issues. As a result, I took a major step back from Twitter in general, and especially forced myself to stop reading Twitter in bed, or even in the late evenings. This produced an immediate improvement in both sleep quality and overall mood.
In my experience reading on the smartphone is an underrated cause of sleep issues. No matter what I read and no matter how dimmed and red my screen looks - it certainly helps - but it still impacts my sleep negatively. The desire to keep your mind busy even right before or actually while intending to fall asleep is also an indicator for other underlying issues. If I stop engaging in these distractions I get a chance to actually face those and deal with them.
Distractions in general hurt sleep. I'm not convinced using the phone is any different than other distractions. Of course, sleep researchers say that doing anything at all in bed other than sleep and sex is a bad idea, but distracting yourself while not in bed too isn't helpful.
Naturally, I ignore that advice and still use my phone in bed. But switching from Twitter to doing other stuff helped significantly, because I can monitor myself and put the phone down when I get calm enough and sleepy enough to sleep. Twitter was preventing me from getting calm/sleepy due to producing anxiety. I do still read Discord, which sometimes can have the Twitter problem depending on what people are talking about, but it helps me keep from feeling completely socially disconnected due to using Twitter less.
Just as a recommendation, if you're on iOS, also use the whitepoint reduction feature in the accessibility settings. That reduces the brightness of the device further, even if you are already on the lowest brightness setting.
Also, depending on the person, it heavily depends on what you are reading. With Twitter you are jumping from topic to topic. That's something completely different than reading a book.
Added bonus of the alarm going off in the morning across the room helps that 2-3 seconds of initial wake up to be more "productive" in waking up - gotta stand and walk for a second before the alarm goes off. Less likely to fall back asleep after just that little interruption.
Even better is to physically turn your phone off at least one hour before bed. If you need to be available for emergency calls then in do not disturb mode with your family set to punch through Do Not Disturb.
I really realized it a few weeks back as well. I found a few things helpful. I turned on the Digital Wellbeing settings on Android. Limited Twitter to an hour a day. It makes me much more cognizant of the time I spend, and I end up not doomscrolling the comments and stuff like that. I also turned on Bed time mode, so its all black and white by the time I am in bed. I can still do it, but with limits and help me not fall into never ending holes as much. Also playing with Focus mode, so I can't really check it in the day until after dinner. Might bump it up a little earlier so I get out of bed faster too.
As a rule, I don't check anything but HN before bed simply because they usually don't have those types of stories. Tonight it had an assassination attempt on a Judge working a high profile case who's 20 year old son is now dead and a husband in a hospital. In the United States.