The works of Ādi Śaṅkarācārya

Bṛhadāraṇyakopaniṣadbhāṣyam

Verse 219

स वा एष एतस्मिन्बुद्धान्ते रत्वा च-रित्वा दृष्ट्वैव पुण्यं च पापं च पुनः प्रति-न्यायं प्रतियोन्याद्रवति स्वप्नान्तायैव ॥

In plain words

This very self, right at the edge where waking gives way to dream, having taken his fill of delight there, having wandered, having only watched — never actually done — the good and the bad, runs back again the same way he came, straight to the threshold of dream.

Close to the Sanskrit

He indeed, this one, at this boundary of the waking state, having taken his enjoyment, having roamed about, having only seen — never done — good and evil, again, by the reversed rule, by the path back to his source, runs indeed to the boundary of dream.