There are a couple of possible culprits that are easy to check and fix.
If your gas is down around a quarter tank or so (or lower), it may not be getting good consistent fuel flow from the tank. The solution is obvious in this case—buy more gas. Likewise if it hasn't been run for a relatively long time there may be air in the line from the tank to the generator causing it to surge for a minute or so—the problem should clear itself up of its own accord in this case.
A dead or dying fuel pump or a binding/dirty governor linkage can also cause surging/hunting. Presumably a quite dirty fuel filter could do the same thing.
Probably the most common cause is a gummy carburetor, unfortunately, from what I've gathered.