Your brain may have been replaying a feeling of closeness and distance at the same time.
During REM sleep the brain may blend recent emotions with older memories, so familiar people often appear in unfamiliar places. Flying dreams may come from the brain's balance and motion systems staying busy while your body lies still.
Try Note how you felt in the first minute after waking.

