Below is a study done on melatonin in humans. It is quite lengthy and covers different conditions both physiological and anatomical. It is a natural GOD provided hormone for multiple purposes. Did you ever wonder why babies often don't sleep throughout the whole dark night until 2-3 months old?
https://www.ncbi.nlm.nih.gov/books/NBK550972/