What causes the inside glass of flight instruments to get hazy?
This can depend on what the actual instrument is and what (if anything) the glass is coated in. 


In some cases the instrument may not have a glass panel at all, it may be acrylic or any other type of similar material. You are mot likely seeing sun damage in this case. 
It may be mold or fungus. Camera lenses suffer from a similar issue. If the aircraft resides in a humid environment, maybe even trapped in a damp hanger you can get build up. Since instruments get rebuilt sometimes (some more often than others) they are opened up and resealed quite a bit in their life times. This may not always happen in a perfect environment and even a small amount of fungus can quickly damage something.
It could be interior lubricants (oil) that are thrown around the instrument as it spins at high speed. 
Some of the older units are not sealed, and for that matter some may even be vented to the atmosphere as is suggested here.  
It could be dust drawn in through the vacuum system that the filter failed to draw out.



  Vacuum systems are very common for driving gyro instruments. In a
  vacuum system, a stream of air directed against the rotor vanes turns
  the rotor at high speed. The action is similar to a water wheel. Air
  at atmospheric pressure is first drawn through a filter(s).