Can a sleeper be aware that he is dreaming?
Question

                What can you say about dreams.if somebody is dreaming and at the sametime he realize that is dreaming while still sleeping.
Praise be to Allah.A sleeper cannot be aware of himself or know that he is dreaming, because sleep is 
    akin to death and sleep is referred to as mawt (“death”) in the Qur’aan and Sunnah. 
Allaah says (interpretation of the meaning): 
“It is Allaah Who takes away the souls at the time of their death, and those 
    that die not during their sleep. He keeps those (souls) for which He has ordained death and sends the rest for a term appointed. Verily, in this 
    are signs for a people who think deeply”
[al-Zumar 39:42]
Shaykh al-Islam Ibn Taymiyah said: 
Here Allaah explains that the taking away of souls is of two types: 
He takes them away at the time of death, and He takes away the souls that did not 
    die in their sleep. Then when they sleep, he keeps the soul of the one who dies in his sleep and He sends back the soul of the one who did not die 
    in his sleep. Hence when the Prophet  (peace and blessings of Allaah be upon him) went to bed, he would say, “Bismika Rabbiy wada’tu janbi 
    wa bika arfa’uhu fa in amsakta nafsi farhamha wa in arsaltaha fahfazha bima tahfazu bihi ‘ibaadaka al-saaliheen (In Your name my Lord I lie 
    down and in Your name I rise, so if You should take my soul then have mercy upon it, and if you should return it then protect it in the manner You 
    protect Your righteous slaves).” 
Majmoo’ al-Fataawa, 4/275 
Allaah says (interpretation of the meaning): 
“It is He, Who takes your souls by night (when you are asleep), and has knowledge of all that 
    you have done by day, then He raises (wakes) you up again that a term appointed (your life period) be fulfilled, then (in the end) unto Him will 
    be your return. Then He will inform you of that which you used to do”
[al-An’aam 6:60]
It was narrated that Hudhayfah ibn al-Yamaan said: When the Prophet  (peace 
    and blessings of Allaah be upon him) went to bed, he would say: “Bismika amoot wa ahyaa (in Your name I live and die)” and when he got up 
    he would say: “Al-hamdu Lillaah alladhi ahyaana ba’da ma amaatana wa ilayh il-nushoor (Praise be to Allaah Who has given us life after 
    taking it from us and unto Him is the resurrection).” 
Narrated by al-Bukhaari, 5953 
This was also narrated by Muslim from the hadeeth of al-Bara’ ibn ‘Aazib (may 
    Allaah be pleased with him). 
Al-Nawawi said: 
What is meant by amaatana (taking [life] away from us) is sleep. 
    Al-nushoor (the resurrection) refers to the resurrection on the Day of Resurrection. The Prophet  (peace and blessings of Allaah be upon 
    him) pointed out that waking up after sleep which is like death is an affirmation of the resurrection after death. The scholars said: The wisdom 
    behind saying the du’aa’ when wanting to sleep is so that a person’s final deed will be this du’aa’, and the wisdom behind saying the du’aa’ when 
    waking up is so that the first of his actions will be remembrance of Tawheed and good words.  
Sharh Muslim, 17/35 
Based on this, it is not possible for a sleeper to know that he is dreaming, because when he 
    is asleep he is not aware in the way that he is when he is awake, so the rulings that apply when he is awake do not apply to him when he is 
    asleep. Hence the sleeper is excused for not doing obligatory duties as the Prophet  (peace and blessings of Allaah be upon him) said: 
    “Whoever forgets a prayer or sleeps and misses it, his expiation is to offer the prayer as soon as he remembers.” 
Narrated by al-Bukhaari, 572; Muslim, 684 
Al-Haafiz ibn Hajar said: 
Abu Ishaaq al-Zajjaaj said: Sleep is called mawt (“death”) because when a 
    person is asleep he does not think and move, which is similar to the case of death. He said this in al-Nihaayah. 
Fath al-Baari, 11/14 
And Allaah knows best.