Edge 540 force restart during activity

Hello, 

I was on a 2+ hour ride today and all of a sudden my edge 540 decided to crash and reboot itself after around 25 minutes. It returned to the activity in pause but missed a chunk of data and took a while to reconnect to my power meter pedals. The same thing happened around 3-4 more times which was pretty frustrating. Any idea what could be going on?