Hello
lot of flatulance might be related to swallowing of air(Aerophagia),
Indigestion, intake of high protein diet, smoking and acidity or
Acid peptic Disease.
I would advise you to find out any of this underlying cause for flatulance
Aerophagia means swallowing of air during taking meal, ill fitting denture,use of carbonated drinks and smoking, so try to correct any of such trigger.
In addition to that you can take antiacidity medicine like
pantoprazole or
ranitidine group of drugs with antacids for a week.
As far as hernia part is concerned, I will not be able to tell you without physical examination so in my opinion you should see a
general surgeon or your family physician for checking it for hernia.
meanwhile avoid straining at stool, coughing , weight lifting.
Hope this answers your question, please do let me if you have any more queries.
Best wishes