If your sleeping schedule is very uneasy and you are deprived of the essential 7 hours of sleep, then consult a doctor and only take melatonin pills if they recommend it.