Doing something you have no recollection of is from anterograde amnesia as one can get from benzos, drinking a lot, or a mix of gabaergics among other things. It may be surprising but that doesn't imply that you were in a particularly altered state of consciousness at the time, especially impaired or inadequate, just that no memories could be formed. However the effects causing it are of course are associated with an intoxication which may very well also be quite impairing. And of course disinhibition can change judgement and decision-making.
Some benzos are more known for this than others, but no walking around doing experiments is really recommended after doing a hypnotic like nitrazepam. If only for the skeletal muscle relaxation I know it for (makes me feel like sliding into a comfy bath).
Muscimol / amanitas don't especially cause amnesia but I'm pretty sure they would eventually... but doesn't it get very dreamy / somnambulistic anyway at a certain point? I guess then it is less about what you did or didn't do but if you rememember the trip at all.
Apologies if I say nothing clarifying, it just seemed like it would be from post 19