Yes, the military does spray a "foam" on some tents overseas and here in the states. The foam hardens and insulates the tents very well. It's been around for a while.
Over in Iraq when we started there were alot of these tents but not all of them had the spray. As the war wound down, most of the large bases had moved into CHU's (Containerized Housing Units) and out of tents for the most part. But, many were still there. The two types of tents your see foamed up mostly are Alaskan tents and GP mediums.
The downside to foaming a tent up is it makes the tent semi-permanent. You can't just take it down. Also, you have to frame out the inside of the tent to support the extra weight. The issued tent supports won't handle it.