Yoga Sutra - Samādhi Pada 1.38
स्वप्ननिद्राज्ञानालम्बनमं वा ॥३८॥
svapna-nidrā-jñāna-ālambanaṃ vā ||38||
Or resting on knowledge [derived] from dream or sleep.
Or [the mind can become steady when it has] the knowledge attained from dreams and sleep as its support.
Vyāsa has little to say about this curious sūtra except to state, without clarification, that the yogī’s mind can take the form of objects of sleep, nidrā, and dream, svapna. Vācaspati Miśra and Rāmānanda Sarasvatī are a bit more specific: When the yogī reaches the point that he dreams of Īśvara, he awakes full of joy. Vācaspati Miśra identifies Īśvara here with Śiva as described in the Purāṇas—appearing like the moon in a secluded spot in a lonely forest, enrapturing the mind with his beauty, with limbs as soft as the lotus stem and a form like shining moonstone, draped with sweet-smelling garlands of mālatī and mallikā flowers. Then, awake, the yogī remembers this form and, absorbed in that vision, the mind becomes steady in meditation on Īśvara. One might add that, in order to be able to have such dreams of Īśvara at night, one has to think consistently of Īśvara during the day such that one’s citta is full of saṁskāra imprints of these meditations, which can then activate during the dream state. Dreaming occurs when the external senses are inactive and the saṁskāric imprints on the mind are active (in contrast to the deep of I.9, when both the sense objects in the external realm and their saṁskāric imprints in the internal realm are quiescent). But the saṁskāras that activate in dream tend to be those experiences that were the most vivid when awake.
Śaṅkara has a different take on this sūtra, which again reflects a Vedāntic perspective. During deep sleep, he says, the citta is free from all thought, which is a type of citta-vṛtti-nirodha (cessation of all thoughts) and thus approximates the goal of yoga. By meditating on this when awake, one tries to attain this state. (Of course, in normal deep sleep, this objectless state is due to tamas and is beyond the sleeper’s control; in meditation, one strives to attain this state as a result of cultivating sattva while fully awake.) The Vedānta tradition holds that the ātman achieves a state of union with Brahman during deep sleep, albeit still mediated by ignorance (Vedānta Sūtras III.2.7–8).
Vijñānabhikṣu puts a different Vedāntic spin on this sūtra and reads it as indicating that the waking state is actually like a dream from the perspective of the self-realized state because the objects of life are as perishable as those in a dream. Accordingly, contemplating dreams from this perspective produces realization of the ephemeral reality of life. Through the detachment from the world that results from such contemplation, the mind attains its desired steadiness and stability, which is the theme of this series of sūtras. Thus this somewhat curious sūtra allows a number of cogent interpretations, all in line with Yogic metaphysics.