The treatment depends on the cause. For example, if the cause is dietary modifications or sudden fibre intake, you need to regulate that. Similarly, other reasons like bacterial infection, constipation, heartburn etc., demand specific treatments. However, the best treatment is to regulate blood sugar levels. Other therapies include both medications and lifestyle modification.