Help with sleep!

Have any of you taken melatonin or something late in pregnancy to help you sleep throughout the night? At this point, my average is probably 3 hours of sleep even though I go to bed in time for a minimum of 6-7. What’s safe to take at 36 weeks? I’ll talk to my OB at my appointment next week but I need something to help until then!