In considering the constitutional state of war powers a few years back, I worried that "executive excesses would probably be tied to [the president using the military domestically], as might be the case if a President sought dictatorial powers through the imposition of martial law." At the time, I was not prepared to offer a structural solution to prevent such a calamity, and for good reason. Smarter people than I have pondered this problem before me, including the Founding Fathers.
Their solution to the question was in the way they structured the Union's military system. A standing, professional army as a dangerous concept to the Founding generation, having just fought the Revolutionary War to throw off the oppresive yoke of the British. Alexander Hamilton notes the danger in The Federalist 28:
[I]f the persons instrusted with supreme power become usurpers, the different parcels, subdivisions, or districts of which [the nation] consists, having no distinct government each, can take no regular measures for defense. The citizens must rush tomultuously to arms, without concert, without system, without resource....
The answer for the Founders was to be found in federalism, and the militia under the command and control of the state governments. Jon Roland helpfully reviews the original constitutional meaning of "militia", which is important when considering that the Constitution in Article 1, section 8, clause 16 gives States the power of "Appointment of the Officers, and the Authority of training the Militia according to the discipline prescribed by Congress."
Amar expands this thought on page 50 of his book The Bill of Rights:
in the event of central tyrrany, state governments could do precisely what colonial governments had done at Lexington and Concord and Bunker Hill: organize and mobilize their citizens into an effective fighting force capable of besting even a large standing army.
Amar quotes Madison in The Federalist 46, which is worth repeating here to drive home the point of just how much the Founders were counting on the local militia:
[T]he State governments with the people on their side would be able to repel the danger.... [A standing army] would be opposed [by] a militia amounting to near half a million of citizens with arms in their hands, officered by men chosen among themselves, fighting for their common liberties and united and conducted by governments possessing their affections and confidence.
The standing, professional army of the eighteenth century was often a hoarde of foreign mercenaries that had no allegiance or fealty to the people in the local countryside where they were ordered to fight. The very structure of the militia meant that it was composed of family members and neighbors who lived and worked together. Already tightly knit and bound to return to life together after war, the militia was bound together by trust and need, so picking their own leaders among them helped tighten their cohesion.
Yet this federalism check on military adventurism by the central government did not quell the objections of the Anti-Federalists. Many pointed out that Congress still had power "to provide for organizing, arming, and disciplining, the Militia." The Second Amendment was designed to limit congressional manipulation of the militia and leave them available to arming by the State governments.
While the meaning of militia has morphed over 200 years, the core concepts of the Second Amendment are still applicable: the militia was composed of all the people capable of bearing arms, so "the people", subjects of the federalism-based rights of the First Amendment, are also the subjects of the Second Amendment. And, as Amar argues, the "well-regulated" can't mean the power to disarm, as this was the very power it sought to keep away from Congress. Localism was the very heart of the militia system and for that reason, along with the experiences of the ratifiers of the Fourteenth Amendment that relied on standing armies to preserve the Union against the tyranny and abuses of localities and states (ironically the opposite experience of the Founders), there is good reason to incorporate the Second Amendment against the states.
As an aside, Amar also argues that the conscription is unconstitutional because Congress circumvents the power of the State governments to appoint the officers of the militia and training the militia. "Under this reading, the federal government cannot directly force ordinary citizens into it's army, but state governments can conscript, organize, and train their respective citizens -- the militia -- who can in times of emergency be called into national service." (p 53)
The Third Amendment also acts to support civilian values against an overbearing military, working to subordinate the military to the civil power. Amar writes:
No standing army in peacetime can be allowed to dominate civilian society, either openly or by subtle intimidation. The Second Amendment's militia could thwart any open military usurpation - say, a siege - but what about more insidious forms of military occupation, featuring federal soldiers cowing civilians by psychological guerilla warfare, day by day, house by house? Bostonians who had lived under the hated Quartering Act of 1774 knew that this was no hypothetical. Hence the Third Amendment was needed to deal with military threats too subtle and stealthy for the Second's "well-regulated Militia." (p. 59)
Modern jurisprudence has a tendency to use the Third Amendment to construct rights of privacy for the individual, but the original context of the Third Amendment placed further limits on Congress' conscription power and further enforced separation of powers between the legislative and the executive. Congress' conscription power was restricted because if civilians could not be impressed upon to limited service as Innkeepers and cooks for soldiers, then what sense does it make that civilians can be pressed into full military service? Separation of powers were further defined because it took Congress, not the executive, "in a manner prescribed by law" to conscript a person's house.
So we see that the Second and Third Amendments work together to subordinate the military to the civilian power and to place checks against the executive's misappropriation of the military for his own purposes. Combined with Congress' complete power to raise and govern the military and to declare war, the Founders erected a wonderfully symbiotic system to ensure that all parts of society truly believed war was necessary before the nation was committed to war and, once it was, that the military would be used in a responsible manner.
Some argue that is was necessary for the United States to evolve away from the militia system in order to become a great power. The Bible reminds us that Israel abandoned its reliance on God to anoint a King "like all the nations." If we want to wield power "like all the nations," then in order to not become serfs to tyranny "like all the nations", the people of the United States must insist on a symbiotic system of checks and balances around our modern-day war powers for our military arrangements, just as the Founders did for their own. Yet another lesson we have forgotten in our modern rush for convenience, efficiency and power.