The Sleep Products Safety Council explains the purpose of the mandatory mattress fire test and what is required to pass:
The principal aspect of the national mattress standard (referred to as ‘16 CFR Part 1633’) is the “open-flame” test. The standard requires that any fire resulting from a mattress exposed to an open-flame heat source, such as lighters, matches, or candles, burn more slowly and generate less heat than fires involving non-compliant mattresses today.
Anyone selling mattresses in the United States must have them tested. Here are the details behind the test.