I assume it's an electronic unit since you mentioned the sensor. Here's a list of things to check. The meter itself will have a wire that supplies it with 12V and a ground wire. It could have another wire that powers the dash lights. Either of the former could have a corroded or loose wire connection somewhere. Also check the wire between the sensor and the meter for the same problem.
Hall Effect Sensors normally work and then quit completely, although they may "wake up" the next morning when everything has cooled down. Other times they work fine and then die totally. Since the meter works on and off, then I don't suspect the sensor. The other possibility could be the circuit board inside of the meter itself or the little motor the needle is attached to if it's an analog meter (digital displays don't have the motor). I guess a solder joint could be broken loose inside, but were it me, the sensor and meter would be the last things I'd suspect.