This poem seems to me not to be a nightmare of one asleep. It is more like a frightening "daymare" of one who is so griefstricken by the death of his love that he can only see the horror of life without her and the knowledge that he will never see her again. He builds his emotion as he imagines the bird saying to him "Nevermore" over and over again; he tries to get rid of the bird in the second to the last and the last stanza, but the result of his intense emotional outburst is that the Raven is around forever reminding him of the "Nevermore." I believe the evidence is stronger that he was awakened suddenly and that perhaps he was not clearly thinking. However, since the Raven stays "forever," we can assume that this was something that was from an awakened state of mind.