The best time to take melatonin is around 30 to 60 minutes before bed. If you’re lying down in a dark room, melatonin should help you feel drowsy within as little as 30 minutes.