Does turning the patient compared to pressure mattresses reduce the risk of pressure ulcers throughout their time in the hospital

In non-ambulatory patients, does turning the patient compared to pressure mattresses reduce the risk of pressure ulcers throughout their time in the hospital?