For that matter, Congress can legally restrict speech in certain national security issues, and has, again, done so for a very long time. The Supreme Court has (in my opinion, correctly) understood that restricting people handling classified documentation from repeating that information is, without extraordinary circumstances (more on that in a second), completely legal, for example.
The trick here is the sheer breadth of the NSLs. I completely agree that they're unconstitutional, and I sincerely hope they are struck down in court. But I hope that I've just highlighted why this isn't a slam-dunk situation for those on the receiving end of an NSL. Add in that, at least so far, any disputes with NSLs have to be taken up with the FISA court, and even wins against NSLs don't actually count as binding precedent, because FISA itself does not create binding precedent.
Congress can, in certain circumstances, make laws restricting freedom of speech. This isn't one of those instances. But suing our way to that conclusion will take time, money, and personal risk for the petitioner.