All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
This experience, either in reality or in dreams, is no more than a Satanic illusion. The dead never return to this worldly life. Allaah Says (what means): {He says, "My Lord, send me back. That I might do righteousness in that which I left behind." No! It is only a word he is saying; and behind them is a barrier until the Day they are resurrected.} [Quran 23:99-100] This is in regard to this apparition if it takes place when one is awake.
If such an apparition takes place in a dream, it is also a Satanic illusion because Satan can take the image of any person except the image of the Prophet . In a narration on the authority of Jaabir the Prophet stated that he who sees him [the Prophet] in a dream has really seen him, because Satan cannot appear in his image.[Al-Bukhari, Muslim and Ahmad]
The evidence that this vision is from the devil is that what is claimed that Maryam blesses them and heals their patients is not true because blessing and healing are Attributes that are peculiar to Allaah. He is The Blessed and The One Who blesses. Allaah Says (what means): {Blessed is He in whose hand is dominion.} [Quran 67:1]
Thus, the only interpretation for such an experience is that it is a Satanic illusion, which is intended to spoil people's belief and make them commit Shirk (associating partners with Allaah).
Allaah Knows best.