For me, it’s dependent on waking up in a half-dreaming state. Then I’m able to sort of “translate” the dream into language, which I remember—-and sometimes from there I can get back to parts of the dream I didn’t think I remembered. It’s still very rare for me and I’ll go years without remembering a single dream—-in fact, mentioning this to friends when I was younger was one of the first areas where I learned my conscious experience was so different. I imagine getting better at it would be similar to getting better at lucid dreaming.