I believe your thought process is correct. It's fun to try to practice in the dream state... Lucid dreaming. I'm still learning this.
Lucid dreaming will inform your "awake"/ not sleeping state. I have friends who will say to themselves every 15 minutes "this is a dream". The idea is to program your consciousness.
Who are you studying yoga with?