Haven't nailed it yet myself! But breathing techniques + low temperature in your bedroom + staying away from blue light (screens) in the evening can help sort it out!
Switch to a different comfortable position and lie still. Don't open your eyes either. Don't lookup your phone or start thinking things. Keep the mind empty.
Thats very dificult. The mind doesn't stop thinking! What I tend to do is to put on meditation- body scan. It really helps. But usually I stay awake 2 hours.. I hate it*