The batteries will charge while towing if the charge line in your tow vehicle is operational. They will also charge while plugged into electricity or generator. If they are not charging, something is wrong. Could be as simple as a fuse. My trailers have a fuse just out of the battery case. If it blows, you have no battery power and it can also not charge.
When I run my generator and my batteries are low, I plug a battery charger into my 5'ers outside 115V outlet and hook the charger up to my batteries. That puts a larger/faster charge on my batteries than my converter puts out.