“Among the things we have learned about death is that there are also some exceptional experiences that occur around the deathbed that can have a profound impact on those experiencing or witnessing them. These are deathbed visions and deathbed dreams. “
In this article by Psychology Today, we see how these phenomena are not only common but can be helpful, particularly when dealing with grief. You can read more about those findings here