Bad Nanos

It could an electrical noise problem - if this is the same battery powering the motor or servos.

I have had this with Nanos fed from the same circuit as a pump - spikes were killing them after several
Occasions of causing restarts
I dropped voltage a bit with a couple of diodes on series with the power supply followed by a couple of capacitors.