The Posse Comitatus Act was designed to prohibit the President from declaring martial law absent a major breakdown in order. In theory, anyway. In practice it was to make sure that the President couldn't force states to combat the more violent anti-Reconstruction groups.
The Alien and Sedition Acts were simply meant to stifle political opposition.