There are many techniques for this, and a great place to start is liminal dreaming-exploring the states of hypnagogia and hypnopompia.
I will post about this but for a deep dive, I can highly recommend this book ⬇️
nostr:note1j0xf0j2zg6xsrhrc78k4garuqmh36kxxznm23jk8namn53cf6u2q9kwecv
