Is the ability to dream a genetic trait, or is it only found in the individual?

Because my mom says she used to study for tests in her dreams, and that it actually worked. But she didn't know what lucid dreaming was at the time, but she still DILDed all the time.