The Vedanta Sutras of Badarayana, Commentary by Sankara (SBE38), tr. by George Thibaut  at sacred-texts.com
3. But it (viz. the dream world) is mere illusion (mâyâ), on account of its nature not manifesting itself with the totality (of the attributes of reality).
The word 'but' discards the pûrvapaksha. It is not true that the world of dreams is real; it is mere illusion and there is not a particle of reality in it.--Why?--'On account of its nature not manifesting itself with the totality,' i.e. because the nature of the dream world does not manifest itself with the totality of the attributes of real things.--What then do you mean by the 'totality'?--The fulfilment of the conditions of place, time, and cause, and the circumstance of non-refutation. All these have their sphere in real things, but cannot be applied to dreams. In the first place there is, in a dream, no space for chariots and the like; for
those cannot possibly find room in the limited confines of the body.--Well, but why should not the dreaming person see the objects of his dream outside of his body? He does as a matter of fact perceive things as separated from himself by space; and Sruti, moreover, declares that the dream is outside the body, 'Away from the nest the Immortal moves; that immortal one goes wherever he likes' (Bri. Up. IV, 3, 12). And this distinction of the conceptions of staying and going would have no good sense if the being (the soul) did not really go out.--What you maintain is inadmissible, we reply. A sleeping being cannot possibly possess the power to go and return in a moment the distance of a hundred yoganas. Sometimes, moreover, a person recounts a dream in which he went to some place without returning from it, 'Lying on my bed in the land of the Kurus I was overcome by sleep and went in my dream to the country of the Pañkâlas, and being there I awoke.' If, now, that person had really gone out of his country, he would on waking find himself in the country of the Pañkâlas to which he had gone in his dream; but as a matter of fact he awakes in the country of the Kurus.--Moreover, while a man imagines himself in his dream going, in his body, to another place, the bystanders see that very same body lying on the couch. Further, a dreaming person does not see, in his dream, other places such as they really are. But if he in seeing them did actually go about, they would appear to him like the things he sees in his waking state. Sruti, moreover, declares that the dream is within the body, cp. the passage beginning 'But when he moves about in dream,' and terminating 'He moves about, according to his pleasure, within his own body' (Bri. Up. II, 1, 18). Hence the passage about the dreamer moving away from his nest must be taken in a metaphorical sense, as otherwise we should contradict scripture as well as reason; he who while remaining within his own body does not use it for any purpose may be said to be outside the body as it were. The difference of the ideas of staying within the body and going outside must, therefore, be viewed as a mere deception.--In the second place we see that dreams are in conflict with
the conditions of time. One person lying asleep at night dreams that it is day in the Bhârata Varsha; another lives, during a dream which lasts one muhûrta only, through many crowds of years.--In the third place there do not exist in the state of dreaming the requisite efficient causes for either thought or action; for as, in sleep, the organs are drawn inward, the dreaming person has no eyes, &c. for perceiving chariots and other things; and whence should he, in the space of the twinkling of an eye, have the power of--or procure the material for--making chariots and the like?--In the fourth place the chariots, horses, &c., which the dream creates, are refuted, i.e. shown not to exist by the waking state. And apart from this, the dream itself refutes what it creates, as its end often contradicts its beginning; what at first was considered to be a chariot turns, in a moment, into a man, and what was conceived to be a man has all at once become a tree.--Scripture itself, moreover, clearly declares the chariots, &c., of a dream to have no real existence, 'There are no chariots in that state, no horses, no roads, &c.'--Hence the visions of a dream are mere illusion.