If it is night and you can sleep
, the best thing to do is get out of bed and bedroom. Do some quiet activity like listening to music or reading.
Do not turn on electronics or eat which can disrupt further. When tired, return to bed. If it is due to thoughts racing, put another thought or word in head to counteract and "bore" you back to sleep.