A poll by public broadcaster ARD showed 21% of respondents agreed with the proposal.
“This is racism. I think we need to wake up. Many people in Europe have had to flee… looking for a safe country,” Nagelsmann said on Sunday.
The 36-year-old said he agreed with Germany midfielder Joshua Kimmich, who a day earlier described the questionnaire as “racist”.
“Josh [Kimmich] “We responded very well and made a very clear and well-thought-out statement,” Nagelsmann said at a briefing at the team’s training ground.
“I look at this the exact same way. This question is crazy.
“There are people in Europe who have to flee because of war, economic factors, environmental disasters, and there are people who just want to be sheltered,” he continued.
“We have to ask, what are we doing now? We’re doing very, very well in Germany and when we say things like this, I think it’s crazy that we turn a blind eye and simply prevent this kind of thing.”
German public broadcaster ARD said it had commissioned the survey to get measurable data after a journalist working on a documentary about football and diversity was repeatedly asked about the make-up of the national team.
The poll was conducted among 1,304 randomly selected respondents.
Karl Valks, sports director of ARD TV, which commissioned the poll, said the company was “disappointed by the result, but it is also a reflection of the state of German society today”.
German media quoted him as saying: “Sport plays an important role in our society and the national team is a strong example of integration.”
There are a number of players of mixed heritage in the current national team, including captain Ilkay Gundogan and winger Leroy Sané.
Germany will host Euro 2024 later this month and Nagelsmann said his team will play “for everyone in the country”. They will play Scotland on June 14 at the Allianz Arena in Munich.
The controversy comes just weeks after the team’s jersey manufacturer Adidas was forced to ban fans from buying customized football jerseys with the German number 44 after media pointed out that the number 44 was similar to the symbol used by the Nazi SS during World War II.
The SS was responsible for many crimes against humanity committed by the Nazis. SS members included Gestapo agents and concentration camp guards. The responsibilities of the SS included running the death camps where millions of Jews and others were executed.