My dad was a pastor and has been at the bedside of many people when they died. Often, just as a person was passing, some would open their eyes and seem to look beyond what was happening around them, and some would smile as if they recognized someone, some would speak a phrase, and some would do both.
After he was gone and I was on the way home it occurred that maybe those were embracing motions, greeting people he knew when they were meeting him as he crossed over. I don't know, but it seems as likely as any other explanation, at least for those of us who believe in life after this earthly one is completed.