Yes, it is illegal to throw a mattress in a public dumpster in Australia. Most states impose fines for people who litter or dispose of large items, such as mattresses, in public places. Some local councils may have restrictions on the disposal and collection of bulky waste, including mattresses. The best option is to check with your local council or waste disposal service before throwing out any large item.