The short answer: when you go to bed matters more than what you did the hour before. The long answer needs three things separated that are usually run together.
Light affects circadian rhythm. Content affects arousal. And time on a screen is time not sleeping. The three have very different weight in the research.
What is well documented
A regular bedtime has solid support. So does a dark, cool bedroom. The effect of blue-light filters, by contrast, is measured in small studies with inconsistent results.
This article does not give treatment advice. If you have persistent sleep problems, they belong with your GP.
About this article
Noen har bruk for det du vet.
Det trenger ikke å være en stor sak. En forklaring, en erfaring, en advarsel du selv skulle hatt. Det er nok til å begynne.