Sleep has always been a huge issue for me when seeking sobriety. I drank for 25 years and toward the end, I was using booze mainly to get to "sleep". Alcohol is a depressant and with regular use, the body counteracts by releasing "wake up" hormones. These hormones continue to be released well after the cessation of alcohol, hence insomnia.
My bedtime on the night of day 1 was 4:30 AM. Gradually, I retired earlier and earlier. At 7 months sober my bedtime is a healthy 10:30. Finally! It took a long time to be tired enough to want to go to bed at that hour and sleep can still be restless at times. But it's a small price to pay for sobriety.
I used magnesium for sleep. I take it 1/2 hour before bed. If I miss taking it, I notice.
It does get better with time. An over used cliche, but it's true.