I had a Garmin 810 which would do that, one of the posts for the screws had a crack in it, and some dampness had got in. It might be worth taking it apart and checking for corrosion on the board. I scrapped the corrosion away, put grease in the posts, and taped over the screw holes. Once reassembled, it mostly behaved after that, but would still have bad periods.
The crack might have come about form the unit being dropped, or maybe it was always there.
Bit of a glutton for punishment. I'm on my 3rd Garmin now, an 830. The last one, a 1000, simply disintegrated and the battery was lasting maybe 5 hours (not even a full ride).