Intelligence can be perceived in three states of activity — wakefulness, dreaming and deep sleep. The person who perceives these three is to be considered the original master, the ruler, the Supreme Personality of Godhead.
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
बुद्धेर्जागरणं स्वप्नः सुषुप्तिरिति वृत्तयः । ता येनैवानुभूयन्ते सोऽध्यक्षः पुरुषः परः
buddherjāgaraṇaṃ svapnaḥ suṣuptiriti vṛttayaḥ | tā yenaivānubhūyante so'dhyakṣaḥ puruṣaḥ paraḥ
SB 7.7.25