This also happened to me (similar at least). My 'solution' is below. Listed here are some other symptoms that I had, that may help another person 'fix' a problem. My car is a 1998 LT Blazer, 4x4.
1. Overhead console (short with sunroof), would also reset the computed milage, after sitting for about 4 hours.
2. Initially, trip meter would only reset when truck sat overnight. After about two weeks, began to randomly reset whenever truck was turned off, or after sitting for a few hours.
3. after the above symptoms had continued for about two weeks, one night I started the truck and the dash lights would randomly blink. Also, each time that I used the high beam main headlights, the dash would either shut off, blink, or the headlights would go out.
4. a few other strange electrical problems occured over a period of about two or three weeks, such as once or twice the car would not start, or was hard to start.
SOLUTION number 1:
Finially, I began to try to find the souce of the problem. I had originally thought the problem was simply that the dash instrument cluster was damaged/ broken, and required replacement. But I figured I had nothing to lose, by looking for the problem.
Something similar happened to me a few years ago. The problem was a loose connection to the FUSE in the main battery cable that runs from the positive battery post, under the radiator, and across to the driver side main fuse panel under the hood.
This FUSE is about two inches long, and has two bolts connecting the battery cable to each end. It is located under the battery box. You have to remove the battery, then the battery box, and then the FUSE is inside a plastic container which is clipped to the back side of the radiator support, next to the radiator.
SOLUTION number 2:
This time the problem was simply a loose battery cable. Well, not so simple really. I suspect that this problem is more common than realized. Follow along here.
Where I live, the underhood temperature probably varies by about 200 degrees. In the winter is can be -10 outside. And in the summer, it can be 105 outside, causing an underhood temperature of close to 200 degrees.
Unless the battery cables are properly torqued, they will come loose. And if they are tightened too much, the battery connection will break internally, and battery acid will spill out. That is what happened two years ago. Some dealer moron overtightened the postive cable, broke it, and my wife did not notice until the battery died (from lack of battery acid). Hey, she has never opened a car hood in her life.
Anyway, during the repair, the dealer tech did not properly tighten the FUSE connections after replacing it (ruined because the battery acid dripped on it). Also had to replace the positive battery cable from the battery to the FUSE.
For this latest problem, I was the one who tightened the battery cables, when I replaced the battery last year. It took about a year for the cables (both) to work loose. And the problem was I was afraid to overtighten them, because of the problem of the broken battery post described above.
The easy way to check if the cables are tight, is to reach down and carefully push/ pull on the cable. Try to rotate it. DO not push hard. If you can gently move the cable, it is loose, and needs to be tightened.
How tight? The only correct way is to torque it to the factory spec, as described in the factory GM manual. Otherwise, you will either make it too tight (and break the battery post), or leave it too loose, and you will eventually have electrical problems.
Factory spec is 11 foot-pounds. I have a beam-type torque wrench that reads only to 12.5 foot-pounds (or 150 inch pounds). If you try to use a torque wrench that reads to 50 pounds or more, it will just not be very accurate at 11 pounds. Also, the 'click-type' wrenchs are definitely not accurate enough. Use either a beam-type, or dial type, or digital type. And use one that does not read more than 25 foot pounds.
To be honest, I could only bring myself to torque the bolts to 8 foot-pounds. That may not sound like much force, but first I tightened the bolts with my 1/4 inch ratchet, until it seemed "really tight". That was only about 4 foot pounds. No wonder they came loose.
Of course, I have never seen my GM dealer tech use a torque wrench for anything. And my Acura dealer tech had 'bragged' to me that he never uses a torque wrench for anything - stupid in my opinion when tightening the oil drain plug, as the aluminum pan is NOT heli-coiled like the GM Blazer one is.
SO, hope this helps someone with a strange electrical problem(s).