If melatonin does seem to help, it's safe for most people to take nightly for one to two months. “After that, stop and see how your sleep is,” he suggests. “Be sure you're also relaxing before bed, keeping the lights low and sleeping in a cool, dark, comfortable bedroom for optimal results.”