I once was so high on MDMA that I could barely speak let alone type something because I just could not understand anything. Not only could I not remember my password, I could not keep my eyes steady enough to see the letters on the keyboard.
I had to unlock my laptop to play some music so I just tried to relax and let my fingers do the thing. I did it.
I've often completely forgotten passwords and had to rely on this muscle memory to regain access.