Could be a local lightning strike or other electrical or electrostatic discharge causing a latch-up. Could be a voltage problem, poor contact or a gazillion other possible physical, mechanical or electrical problems.
Is the circuit screened properly ? All lead wiring EMI / RFI protected etc ?
Could be intermittent or noisy clocking or a flaky reset circuit or just a faulty micro.
If all pins went high, it might suggest that your code, for whatever reason, jumped off to never never land, i.e a stack overflow, a pop without a push etc.
Creating a reset condition without a vector in some manner.
Perhaps an unusual combination of events triggers the problem.
What you need is a log of the events leading up to the anomaly, like pin states, register contents etc.
Maybe write an additional piece of code to log stuff as it happens ?
rgds