The law only applied to seamen working aboard any "ship or vessel of the United States arriving from a foreign port into any port of the United States". In other words it only applied to those engaged in foreign commerce. One of the enumerated powers of the US government is "to regulate Commerce with foreign Nations, ..." I guess the 5th Congress and President Adams understood the 10th Amendment after all.