Trouble sleeping?

Having trouble sleeping I use to take seroquel for sleep and anxiety but I recently just stopped although my dr said it was safe there was still some risks. Is there anything else I can take? She said melatonin but last year I took that and didn’t do well on it.