Hi. It seems that you had an episode of sleep walking or somnambulism. Please do consult your treating doctor. One single episode do not warrant any intervention. However, if repeat episodes do happen, treatment with benzodiazepines might be considered.
Next Steps
Discuss with your treating doctor regarding the same.