I know this subject has been discussed but I couldn't find a definitive answer. Maybe someone has done this and it worked.
I sometimes stay at campgrounds where you must shut off your generator at 8pm. I once was approached by a ranger at 8:15 because I hadn't shut down my inverter/generator. This was at an ocean front campsite where the ocean waves were as loud as my little genny.
Anyway, I have looked into constructing a soundproof box as many have done but am not sure if it will do what I want - be quiet enough so you can't hear anything 20 feet away. Maybe this would be enough to allow it to operate after quiet time starts.
My Ryobi generator is not very loud as is as I have it set to idle down which is where it mostly operates at. I use it to keep my batteries topped off at night while watching TV. It isn't required to supply much juice.
Too bad moon light doesn't work with my solar panels.