I'll add my good thoughts for the pilot involved.
However, I'll add that it must have been a very unpleasant experience for the Captain involved. I had a similar episode once with a co-worker who suddenly started acting very strangely (it eventually turned out to be manic depressive disorder) and it was totally un-nerving for me and all the others he encountered. It was bad enough at ground level--I can only imagine how it must have been on a small flight deck at 30,000 feet.
As for advance signs, all I can say is that in the case of my colleague, one minute we were discussing an electronic wiring issue and the next he was claiming to be Jesus Christ and offering to perform miracles for his friends. There was no warning.
Bobbsy