I sleepwalked and here's my take on sleepwalking. I sleepwalked when I was super tired (too much running etc) or having lack of sleep. (I use past tense because I don't want to sleepwalk)
We can still be quite conscious when we sleepwalk. Meaning we can not just perform tasks by drinking water. We may even be able to find a key and unlock doors etc.
Eg: One incident was my sister came home late one day and she didn't have a key. I was sleeping and the next day, I asked her how she came into the house. She told me I open the door for her in which I have no recollection.
After much consideration, I realised one type of sleepwalking is: We are actually conscious when we are sleepwalking. Our brain chose to FORGET what we did when we go back to sleep. In other words, you are NOT ACTUALLY SLEEPWALKING. YOUR BRAIN JUST FORGOT ABOUT THE ACTIVITY.
I used to be a heavy thinker/best in Math in school/logic thinking etc.