Funnily enough, this happened to me just today! After almost two years of studying 6502 assembly in my spare time, the whole mindspace required to be an efficient and productive assembly programmer clicked for me this afternoon.
It wasn't literally sudden, more so a realization over the course of an hour after the usual reading and re-reading of various tutorials and documentation that I had already been doing. I'd say a few hours into programmer flow was when it all came together.
I liken it to when I first grokked Lisp back in high school. A shedding of mental fog leading to a sort of "now I finally get how somebody could program a game in this without being some hack-the-planet-level computer whiz."