I don't know about surgical masks, but N95 respirators have been nearly totally sold out at retailers for a couple weeks.
I know there are questions abut the use of N95 respirators to prevent infection when used by nonprofessionals, but they seem more widely available to consumers (at hardware stores) compared to surgical masks, due to their use in construction.