We had the same problem several years ago and, of course, we got lots of solutions and causes from lots of people. The most realistic cause was well water. We had stayed only in campgrounds with city water connections because we were new RVers so we didn't encounter the problem right away. After a week at a lake where the water was supplied with well water we then experienced the smelly water problem. It was so bad that the kid next door literally got sick. I proceeded to talk to everybody about what the cause was and what the solution could be.
I got so many opinions that I decided to do my own thing. I made an adapter so I could connect a garden hose to the water heater drain and ran fresh city water through the whole hot water system until the water was fresh smelling. I had to let a lot of water go down the gutter that day but it worked.
Now, before I put the rig in the storage building I drain the water heater. It only takes a minute and no more smelly water. It also only takes a minute to refill the water after we hook up at our destination.
I do use a water filter and I throw it away after our trip is over. BTW, we aren't full timers so this may not work for everybody but it works for us.
I once cut one of the filters open to see what it looked like inside after sitting for a week and it was really ugly, dirty nasty looking brown and yellow and reddish color.