Be engaged during the day. Use that mental energy. Whatever that means, but challenge yourself and exhaust yourself.
Exercise which is just generally really good for your mental and physical state. Do note that working out later at night can make the problem worse since exercises also causes stress chemicals in your brain and it takes a few hours for those to clear.
Melatonin[1] an hour before bed. It's safe, non-habit forming, dirt cheap, very mild and surprisingly effective in my experience. I take it as needed instead of every night, but I know a few folks take it every night.
[1] - https://slatestarcodex.com/2018/07/10/melatonin-much-more-th...