If a person prostrates on a very soft mattress where their forehead keeps sinking without finding a stable resistance, the prostration is valid.

The Pillars of Prayer Part 2: Bowing and Prostration Mechanics