Melatonin is a hormone produced in the pineal gland in the brain. It is normally only produced in the evening and at night. People with ASPS can take melatonin by mouth in the morning. People with DSPS can take melatonin in the afternoon or evening, and this treatment works also for some people with Non-24.