The reason that it is possible to lie down on a bed of nails without being hurt is that there are plenty of nails on such a bed and so there is very little actual force pressing down on any given nail. As long as there is not much force on any given nail, it will not hurt your body to lie on the nails. Pressure = force/area, so if you have a lot of area (many nails) you get less pressure on any given area.
There is no reason why the nails should be closer together at the bottom of the bed unless that is where you are going to sit down first (before you lie down).
A nail can prick the human body causing a wound only when the pressure exerted by point of the nail on the body. When someone lies down on a bed composed of very large number of nails, the total body weight pressing on the bed gets divided among the nails, with the result that each nail is pressing up against the body with a very small force.
For example let us consider a bed made up of 20 rows of nails with 120 nails in each row. This makes 2400 nails in total. When a person of 60 kilogram sleeps on this bed, the average body weight supported by each nail is just 0.25 or quarter of a kg. The pressure exerted by 0.25 kg of weight is much less than the pressure required for the nails used in such bed to puncture the skin. Of course the bed of nails of this kind would still be quite uncomfortable.
The question about successive bands being closer together, given in the supplementary information to the main question, appears to be part of a question on some thing other than bed on nails. There are no bands on bed of nails. Therefor, I offer no comment about it.