David Stockman, Reagan's budget director and one if the ideological leaders of the Reaganomics movements, credits most of Reagan's military buildup to Carter and the 1978-1980 (Democratic) Congress. He said that Carter had proposed significant military increases for the 1980 budget, Congress took Carter's plan and increased it further. Reagan and his budget team took Congress's number, thought it was Carter's number, and then just arbitrarily tacked on another 5%, just because Reagan's budget had to be 5% bigger than Carter's number. Not, notably, because they had an actual plan for a buildup which called for that level of spending.
So Reagan's final military budget was an arbitrary increase on the top of an increase which was on top of a thoughtful increase.
All of that extra spending was funded by deficit spending, and all of that money went to waste in the long run, because it was all spent on things which were unneeded and eventually gotten rid of.
Source, "The Triumph of Politics" by David Stockman.