I looked in internet for data about melatonin.

I read that melatonin developes in darkness and light makes it go away, so I thought ok , so I'll keep my eyes free from light and put something so it would keep me safe from it. I did it and I remembered my dream.

Also staying in a dark place an hour before going to sleep may help.

So , anyone tried this , I'd like other people to try it and see if it helps.