sleep aid?

can you take melatonin when pregnant? or what can u take to help you sleep