I know, isn't it cool?! There are also hormones you can take to improve your memory which also gives you more vivid dreams, people have even said it causes them to have lucid dreams but there's no science behind that. But aside from hormones, simply observing your surroundings causes new neuron paths which also improves your memory. There are also memory exercises you can do to improve your memory, such as memory games, or writing things down, or recalling your day before you go to sleep.
no subject