It usually goes away once you stop the meds. Diet: Eating foods high in protein or certain chemicals can lead to foamy urine. It's usually nothing to worry about, and a diet change can fix it.