Up all night

Kiera • Married April 18th. Trying for second baby :)
Every night I'm up until two am it's horrible. I have rls even before pregnancy but now it's so much worse. That added to general insomnia and discomfort from being hugely pregnant... I cannot sleep. I am. Going crazy... Idk what to do. My dr told me I could take melatonin but I haven't picked it up for some odd reason. I generally spend hours walking and doing squats alone at night going crazy...as you can tell right now is one of those times and I'm just wondering if anyone has ideas to help or general experience.