The macrobiotic diet is the place to go to research this subject. One really doesn't have to do anything special to change an overly alkaline or acidic condition to normal -- all one has to do is eat a diet that balances the system and the overproduction is no longer necessary. A good book on macrobiotics will tell you which foods produce an alkaline reaction, and which acidic, though obviously protein will produce an acidic environment because it's necessary to digest protein.
Your body is under control of homeostasis and like any living organism is all about balance. Getting too much of something is making your body wanting to get rid of the extras in general and not enough will basically result in symptoms too. Water
It is all about balance and knowing what your body needs based on your own body and metabolism. Some vitamins and minerals are water-soluble (vitamin C, Bs) while others are fat-soluble (lipophilic) substances. You can accumulate a good amount of vitamin A, D ,E and K in fats there making supplementation not a good option in people with proper amount of A.D.E.K.
Magnesium is water-soluble and you are very likely to eliminate the extra magnesium in urine and/or fecal matters.
Your idea of an acid environment is limited to the intestine and the same is true as too much acid is not good and not enough is not good. Your body knows what enzymes are needed for what conditions etc so listen to your body and try to be constant in your diet.
M4