In such an event, there are hundreds of nails on the bed. More the number of nails, the more is the area of contact between the nails and the performer.
We know that,
Pressure α 1Area, when force applied is constant.
The increase in the area of contact reduces the pressure exerted on the performer.
This is why the circus performer can easily lay down on the bed of nails without hurting himself.