melatonin safe while ttc?

I'm having a hard hard time sleeping at night😕. It sucks!!! Is melatonin safe to take?