When a person believes that they have woken up but are actually still asleep, they are experiencing a false awakening. When the person truly wakes up, then they realize that the previous “awakening” had only been a part of their dream.
During a false awakening, people may be aware of something being off about the situation that they are in. This can be a feeling of derealization—where the person believes that they are partially awake.