is it responsible for any memory related disease?
No.
Dementia
A 2016 Cochrane review found no evidence that melatonin helped sleep problems in people with moderate to severe dementia due to Alzheimer's disease. 
the primary high energy molecule in human metabolism is Adenosine triphosphate (ATP) what is catabolism? It is the set of metabolic processes that breaks down large molecules. which hormones are related to it? Cortisol, glucagon, adrenaline, cytokines, orexin and melatonin. what is the emotional response due to the third one? Fear. how does the first hormone related to metabolism of glucose? Cortisol stimulates the synthesis of 'new' glucose from non-carbohydrate sources; this is known as gluconeogenesis.. is process resisted by insulin? Yes. when was this substance which resists the process discovered? 1921. can it be extracted? Yes. from where? Pancreas. can we find in plants the last hormone in the list of hormones mentioned above? Yes.
No No evidence is found No.
Melatonin Melatonin Melatonin
Dementia Dementia Dementia
 A 2019 review found that while melatonin may improve sleep in minimal cognitive impairment, after the onset of Alzheimer's it has little to no effect. Melatonin may, however, help with sundowning.  2019 review found that while melatonin may improve sleep in minimal cognitive impairment, after the onset of Alzheimer's it has little to no effect. Melatonin may, however, help with sundowning. A 2019 review found that while melatonin may improve sleep in minimal cognitive impairment, after the onset of Alzheimer's it has little to no effect. Melatonin may, however, help with sundowning.
wiki:19892670
Melatonin [SEP] Dementia
A 2016 Cochrane review found no evidence that melatonin helped sleep problems in people with moderate to severe dementia due to Alzheimer's disease. A 2019 review found that while melatonin may improve sleep in minimal cognitive impairment, after the onset of Alzheimer's it has little to no effect. Melatonin may, however, help with sundowning.