I try to have a dialog in my head of some situations. I close my eyes in bed and start down that route. If it becomes a regular occurrence, your mind takes over and runs down some alternative situations and you could train yourself to know you're going to sleep. It's like forcing your brain to head into a dream.