A Midas Bag changes items inside to gold. It is unknown if status of bag changes amount of gold produced. Spellbooks are changed into gold spellbooks; potions are sometimes changed into gold potions (it's unclear why it doesn't always work). It can also sometimes turn suits of plate armour into suits of gold plate armour.
With CHA 17, midas bag gave +1 coin per item as compared to the trader for basic and cursed weapons, including arrows. However, it was only +1 coin per action. For example, adding items two at a time only generated trader value plus one additional coin. Adding the items to the midas bag one at a time gave an extra coin for each item. Unidentified gems were about 60% value offered by trader. Blessed/enchanted items yielded more money from the traders (use the trader), but basic and cursed items get more money from the bag (use the bag).
Placing empty, looted chests inside midas bags yields money.
Caution! The Amulet of Zaw CAN be placed inside the Midas Bag, which will result it being turned into 1101 gold. This is a one-way process, and once done, the Amulet is gone and the game cannot be completed.
Gold potions have a chance to generate as nearly any type of potion in the game. If they happen to generate as a powerful potion such as Gain Level, Gain Ability or Full Healing, a Midas Bag can mass produce these potions and allow a character to become very powerful very quickly.
It seems that there is a lower probablility of the potion turning into a gold potion depending on the value of the potion. If gold potions are gain level, potions placed in the bag will have lower chance of turning into gold potions (I have no physical proof of this, but I went through about 30 potions in this instance and did not get a single one to change). It is also possible that a patch has removed the feature of mass producing potions of gain level.