Sleeping on the floor can be harmful:
Well, if you are healthy, then nothing will happen if such a dream does not cause discomfort to you.
For two summers I slept on the floor, on a rug. If there is no draft, there is nothing wrong with that. Maybe even good for the back. I slept like this because it was hot on the bed
I think it's harmful on a bare floor. Especially if you are of a thin build: the area of contact of the body with the surface is much smaller, the pressure on these points is higher. Accordingly, bruises may appear, etc.
But if you use a thin mattress, then, I think, you already need to look at why you are doing this.
If you have problems with posture, then here you first of all go to an orthopedist. If you just torment yourself, then, I suppose, you should understand the reasons for such a desire If you just like it, then do not deny yourself - at least sleep on nails.
I'm not an expert either, but, for example, my grandmother, according to the doctor's order, sleeps on a board (from the closet) on a bed (the floor is just cold). The main thing is not to forget about a good pillow to relax your neck.
Everyone used to sleep on the benches.
Andrey, I'm not an expert, this is for orthopedists) - But, because you asked, - my diploma of the medical faculty whispers that for a person without serious problems with the spine, there is no harm. And the memory brings back to the first years of marriage, when one day my wife and I got crazy, we threw a wide mattress on the floor, and we slept like that for a year, probably. Somehow then, probably, it seemed to us an even more attractive field of nightlife than a sofa)) - Well, okay)