It looks like melatonin levels do affect memory. http://www.nootropics.com/melatonin/memory.html

Wait, I read that wrong, so I'm editing this.