It has been a while since I looked at the stats, but I think most people in the military, at least in the Army, actually come from the middle class. This is partially because it’s kind of hard to join the military, and if you are so impoverished that you don’t have access to decent nutrition and decent education, for example, you probably won’t make the minimums to join. It might be the lower middle class, but still the middle class.
I would hypothesize that the top economic decile will probably be about the same as the lowest in terms of joining up. Some people from extremely wealthy families still join the military, if for nothing other to boost their political careers. They don't stay long, and they don't do much while they're in, but they're there. Many people from the poorest deciles will never meet the recruiting gates to join in the first place.
I'll see if I can find the data. I could be wrong.
Edited to add:
Council on Foreign Relations:
"Most members of the military come from middle-class neighborhoods. The middle three quintiles for household income were overrepresented among enlisted recruits, and the top and bottom quintiles were underrepresented."
"We find that recruits score higher than the civilian population on cognitive skill tests, and come from households with above average median parental income and wealth. Moreover, both the lowest and highest parental income categories are under-represented. Higher skill test scores increase enlistment rates from lower- and middle-income families while decreasing them for high income families. The over-representation of minorities in the military has declined in recent decades. Non-Hispanic White casualties are now over-represented in Iraq and Afghanistan."
https://www.ifn.se/wfiles/wp/wp965.pdf
"With funding from the Marguerite Casey Foundation, Washington State University Associate Professor Alair MacLean produced a report about trends in military service by race/ethnicity and class that sought to determine whether the men who served during the recent wars came disproportionately from minority and low-income families. In brief, Dr. MacLean found no evidence that the poor or minorities had been enlisting disproportionately during the recent wars. However, she did find evidence that individuals from families at the top of the income distribution were less likely than their peers to enlist in the years immediately following high school, suggesting a de facto “wealth exemption.”
Class, Race/Ethnicity, and Military Service in the Recent Wars | West Coast Poverty Center