I've seen lots of people swim poorly in the morning, and come back to drop 2 seconds per hundred (occasionally more!) in the evening. Some swimmers just can't get it going in the AM. Manaudou qualified only 8th. Then came back to win. I've seen swimmers qualify 16th in the AM and come back at night to win the "B" final in a faster time than the swimmer who won the "A" final.
The above said, Phelps dying in the last 50 was unexpected, to say the least. But swimming is such an unforgiving sport. Train for 6 months or longer and blow your taper or just have a crummy morning, and it's over. Phelps is fortunate in having so many events. Maybe he'll bounce back. Adds some additional interest to the meet.