Wood flooring is a pretty good choice for bedrooms and I used to have carpet in my bedroom because I loved how it felt on my feet in the morning especially on cold mornings.
But it kept getting stained so I removed it and replaced the carpet in my bedroom with wood flooring and all I have to do now is mop it and sweep it to keep it clean.
And if it gets stained somehow I just mop the stain out of it.
Carpet is usually a better choice for bedrooms but even wood flooring or even laminate flooring is a good choice for bedroom floors.