It is called sleep hygiene and there are many different aspects and rules to this that you can cater to your preference. For example I do use a screen in bed but I have an extreme blue screen filter and also block social media apps- I just listen to stuff or maybe read.