We would need to know more about the generator to help out. Do you know what kind of voltage regulator it has? Does it have brushes?
Several things come to mind, like loose connections or a voltage regulator going out. If it's regulated with a capacitor, it could be the capacitor is going bad. If it has brushes, it could be they are worn to where they just barely make contact, then sometimes don't make contact.
Pictures of the unit might help -