A perfectly elastic collision is one in which energy is conserved. It is an ideal case that never happens in practice.
A related concept is called the "coefficient of restitution". The classic example is a ball dropped from a specified height. The coefficient of restitution is the ration of the "bounce" height to the "drop" height. It cannot be greater than 1, and--in the real world--is always less.
A coefficient of restitution of 1 is equivalent to saying that there is a "perfectly elastic" collision.
Anything dropped on something like a mattress will have a very LOW coefficient of restitution---meaning the the collision is very much INelastic. In fact, I would expect many objects dropped on a mattress to not bounce at all.
There are all manner of ways to see confusing and ambiguous results. For example, a very light object dropped on a soft surface (like a mattress) may in fact bounce. One plausible explanation is that any complex structure can have widely varying elasticity, depending on what it is interacting with. My HUNCH is that the coefficient of restitution between a mattress and a grain of rice is vastly different than with the same mattress and a cannonball.