Works of Vedānta based primarily on the teachings of the Upaniṣads, recognize three ‘avasthās’ or states of consciousness with which we are all familiar: jāgrat (waking state), svapna (dream state) and suṣupti (deep-sleep state). In the jāgrad avasthā both the sense-organs and the mind are active. In the svapna-avasthā it is only the mind, impelled by the latent impression of the waking experience, and, sometimes, by the latent impressions of past lives, that is active. In the suṣupti-avasthā, even the mind is at rest.
In all these three states there is always a ‘witness,’ called ‘sākṣi-caitanya,’ who is ever present as an observer, who also experiences the effects of these states. He is the ātman or the Self.
Since he is, apparently, the ‘fourth’ (as opposed to the three states) he is called the ‘turīya’ (= the fourth). However ‘turīya’ is not considered as a state of consciousness but consciousness itself.
An analysis of the three states of consciousness leading to the establishment of the ātman through reasoning, is called ‘avasthā-traya-viveka’ or ‘avasthā-traya-vivecana.’
This subject has been dealt with in detail in the Māṇḍūkya Upaniṣad and the Kārikās of Gauḍapāda (A. D. 780).