Patient description: The patient is a 15 year old girl with the history of recurrent bilateral headache. The attacks come 2 times or more per week and each episode lasts around a day or a half. The pain is pulsating in quality and severe in intensity, causing trouble in her routine physical activity. The attacks are associated with nausea and photophobia. She recently noticed that that there are more attacks around her menstrual period. She is diagnosed with the migraine headache and is under treatment. She is a high-school student and living with her both parents. She is a book worm and spend her free time in a public library near her home. She is also interested in writing stories and has several short stories in English. She rarely does exercise. Her BMI is 21 with the BP of 100/60. There is nothing remarkable in her physical exam.

Clinical trial eligibility criteria: eligible ages (years): 12.0-17.0,  Migraine in Adolescents Age 12-17 years and weight ≥40 kg, to allow consistent dosing for all participants of the melatonin dose that has been found to be effective in adults 2. Resides in California 3. Headache fulfills International Classification for Headache Disorders, Third Edition (beta version)33 for episodic migraine (with or without aura) in adolescents 4. Has been experiencing episodic headaches for at least six months 5. Experiences between 6-14 days of migraine/migrainous headaches per month at baseline (cutoff for chronic migraine is ≥15 days/month) 6. Developmentally able to provide age-appropriate level of assent 7. Has a parent/guardian capable of giving written informed consent 8. Has daily access to a smartphone in order to be able to complete daily study procedures such as diary completion, and to receive text reminders 9. Subject and parent agree the adolescent will not use over-the-counter melatonin, or another migraine preventive medication, while participating in the study 10. Participant and at least one parent speak English  Currently (or within the last 4 weeks) using any medication or device with migraine preventive properties: i.e. topiramate, amitriptyline, nortriptyline, propranolol, metoprolol, sodium valproate, gabapentin, flunarizine, methysergide, riboflavin, butterbur, coenzyme Q10, or the Cefaly TENS device. For onabotulinum toxin, they will have to have been off it for at least three months 2. Use of other sleep medication or sedating medication, such as benzodiazepines, trazodone, or melatonin receptor agonists 3. History of allergy or adverse event with previous use of exogenous melatonin 4. Previous ineffective trial of melatonin 3 mg nightly for migraine prevention, where the trial duration was at least three months in duration 5. Inability to swallow pills, if this inability persists after instruction on pill-swallowing techniques 6. History of epilepsy or seizure 7. Overuse of acute headache medications, wherein medication overuse is defined33 as ≥4 days per month of barbiturate containing compounds, ≥10 days per month of opioid containing compounds, or ≥10 days per month of triptans or ergot-containing compounds. Those using non-specific analgesics ≥15 days per month would also be excluded 8. Adolescent does not have the cognitive capacity to give verbal assent to participate, or the investigator thinks the adolescent does not have the cognitive capacity to complete the diary, even with parental assistance 9. For females: Pregnancy, lactating or planning to become pregnant during the study. For males: planning to father a child during the study 10. Abnormal neurologic examination findings 11. Serious medical illness of any kind; seriousness as judged by the investigator 12. The investigator does not think the participant can comply with study procedures, or does not think it is medically appropriate for the participant to be in the study