A lot depends how you are going to define the headwaters of the Rhine River. I've ridden some in Switzerland, and I'm not sure there are any flat routes. I've also ridden quite a bit in Germany. We picked up the Rhine when we were leaving Switzerland and followed it into the Netherlands, but we were not very close to the headwaters. You will see ski areas up near the true headwaters
Switzerland has a good network of bike routes, both road and mountain bike. Be careful about staying on the road routes. We got on a mountain bike route by mistake, and it was a challenge, Luckily we ran into a farmer that got us headed
down to the route we wanted.
Do some searches:
Rhine Headwaters Cycling Route.
Rhine Route
There is no problem with defining the headwaters of the Danube