Usually results from sleep deprivation. Microsleep may be linked to narcolepsy and other sleep disorders such as severe insomnia. The person may believe they are awake but are actually in the REM cycle of the sleep process. It happens so quick that the person may not even be aware that they are sleeping. Episodes can last from 30 seconds to a few minutes. Usually, the person enters the dream state and may slip in and out of the REM cycle periodically.
I just fell asleep for 30 seconds, I just had a microsleep episode.