You dream of a future event or a nice event in which you enjoy, but just before the ‘grand finale’ – you wake up.
Dreams with a lot of details that you enjoy are called lucid dreams. During dreaming a lucid dream we are aware that we are dreaming, we can consciously influence the events that we dream of.
It is inevitable that we will wake up from every dream at some point. However, experts are interested in finding out if the awakening really comes before an expected moment in a dream or it just looks that way to us.
In REM phase of sleep, or rapid eye movement stage, we dream the most. These dreams are longer and more beautiful and can stay in our memory when we wake up. However, research has shown that dreams are also possible in NREM phase of sleep ( the stage at which eyes don’t make fast movements), but also that this dream will not be remembered.
In other words, a dream that remained in your memory after waking up and that seems unfinished to you, is not the last you've dreamed. Although it seems that the dream ended a few moments ago, it was really just the end of REM phase.