While I generally see any attempt to overthrow the government as treasonous, the sentiment is not without historical backing. Perhaps my favorite is a quote from Joseph Story, a supreme court justice from 1811 to 1845 (yes, I had to look it up... my memory is
far from perfect).
"A well regulated militia being necessary to the security of a free state, the right of the people to keep and bear arms shall not be infringed."
"The importance of this article will scarcely be doubted by any persons, who have duly reflected upon the subject. The militia is the natural defence of a free country against sudden foreign invasions, domestic insurrections, and domestic usurpations of power by rulers. It is against sound policy for a free people to keep up large military establishments and standing armies in time of peace, both from the enormous expenses, with which they are attended, and the facile means, which they afford to ambitious and unprincipled rulers, to subvert the government, or trample upon the rights of the people. The right of the citizens to keep and bear arms has justly been considered, as the palladium of the liberties of a republic; since it offers a strong moral check against the usurpation and arbitrary power of rulers; and will generally, even if these are successful in the first instance, enable the people to resist and triumph over them. And yet, though this truth would seem so clear, and the importance of a well regulated militia would seem so undeniable, it cannot be disguised, that among the American people there is a growing indifference to any system of militia discipline, and a strong disposition, from a sense of its burthens, to be rid of all regulations. How it is practicable to keep the people duly armed without some organization, it is difficult to see. There is certainly no small danger, that indifference may lead to disgust, and disgust to contempt; and thus gradually undermine all the protection intended by this clause of our national bill of rights.
A similar provision in favour of protestants (for to them it is confined) is to be found in the bill of rights of 1688, it being declared, "that the subjects, which are protestants, may have arms for their defence suitable to their condition, and as allowed by law." But under various pretences the effect of this provision has been greatly narrowed; and it is at present in England more nominal than real, as a defensive privilege."
http://www.constitution.org/js/js_344.htm