Could it have been some sort of fish coma thing?
I had a hamster do this when he got older, he was completely unconscious and we couldn't get him to wake up. We were going to bury him the next day, but in the morning he was alive again. I always assumed he had some sort of stroke/seizure/coma thing happen to him, maybe it happened to your fish?(After that experience I won't bury a pet until it's been dead for a day)
It's great that your fish is alive, and I hope it continues to be for a long time!