They could build housing on federal land, or lease the land to housing developers under favorable terms. I don’t believe the federal government can be bound to local zoning laws.
Now that wouldn’t help you in a city like Boston or New York, but there are plenty of states where the federal government owns the majority of the land.