A lot of the times I stay awake at night with my mind racing I tell myself to go to bed and ill stay up way to late knowing I have work the next day.
Though I have found my own way to help myself fall asleep and it works 60% of the time all the time. In were I do a "dream kickstarter" were its like you give your brain enough imagination to start up a dream that helps you fall asleep. like an unconscious storyteller in your mind.
Sometimes its novel ideas I have had, or different movies and TV shows that would play out in live action sorta way. After 10min of doing this or so ill fall asleep, if not I go back on either reddit or youtube and let my mind go numb again and try again later.
At that point though I'm in trouble and I start panicking counting down the hours of possible sleep I can get and just thinking how stupid I am as they tick down from 5 hours of sleep to 4 to 3 and im like welp guess I'm gonna sleep in the car ride to work then, good luck all you other drivers. GGs