I consider "sleepwalking" as an umbrella-term covering all kinds of unwanted behaviours involving physical activity during sleep (sleeptalking is quite different). The kind of sleepwalking that occurs in children is often associated with deep sleep and that kind of sleepwalking can also extend into adulthood. (We don't know how many adults sleepwalk because unless it happens very often or unless it leads the sleepwalker into trouble then it it goes unreported). The other main kind is REM Behaviour Disorder. This is associated with dreaming during REM sleep when the sleeper enacts their dream (usually the muscles are paralysed during REM but this paralysis fails to happen in REM Behaviour Disorder. It used to be thought that the REM disorder occurred mainly in older men (often ultimately, though not necessarily leading to Parkinson's) but it is now emerging that it can occur earlier and more widely than first thought. Both of these disorders can lead to complex episodes.
Night Terrors occur in deep sleep.
Nocturnal epilepsy may also cause behaviours though generally the behaviours tend to be quite simple and repetitive.
More to come ...