That was a lucid. You dream all throughout your sleep. REM periods are numerous. Sometimes you get excited and wake up.