Latex mattresses are generally considered eco-friendly, because tapping the rubber tree to collect the latex-containing sap does not kill the tree, and most plantations are sustainably managed. Other materials typically used in the construction of latex mattresses, such as organic cotton and wool, are also natural and environmentally sustainable.
However, this is a broad generalisation and every product and company should be assessed on a case-by-case basis. Some manufacturers, for example, use synthetic latex, which is made from petrochemicals and so is not eco-friendly. Similarly, synthetic materials or chemicals may be incorporated in the manufacturing process.
To check whether a latex mattress is eco-friendly or not, look for certifications such as Global Organic Latex Standard (GOLS) or Global Organic Textile Standard (GOTS), which guarantees that the latex used is organic and has been grown without the use of chemical fertilizers and pesticides. The eco-INSTITUT label is also one to check for, as this means the latex is low-pollutant and low-emission. If manufacturers have achieved these certifications they'll be keen to shout about them, so it should be easy to find this information on their website.