Damn cookie! Thats a very dangerous thing - think about what alternatives you could have done, when you couldn't sleep.
Maybe reading a nice book, nothing hard to understand but a great story, or listening to an nice album or an podcast... Sth without much light involved. Especially screen...