I had the same experience after almost 4+ days going without sleep. A friend came to check up on me after I fell asleep, I woke up and started telling him a whole story that made no sense, but I said it with such importance that for a week he was asking me to explain to him what I meant...which I don't remember exactly, but it was important.
This sometimes happens to me when I get a migraine.
A sentence can be coherent in the formulaic sense, but complete nonsense as far as words. I immediately notice that it's incorrect, but I don't have the ability to fix it at that moment.