It is best to put a heater on a hard floor surface like a ceramic tile floor.
It is not recommended to place a heater on carpeting because this can cause a fire. You should turn the space heater off when you go to sleep especially if you have an older space heater that does not have the current safety standards. You also have to make sure that the heater is the right size for your home.
Buying a larger heater for a small home will cause the levels of oxygen to be depleted which will produce higher levels of carbon monoxide which can kill instantly. When buying energy efficient space heaters look for reviews. Energy efficient space heaters are in consumer reports. They offer a seven day free trial membership to their site and it is worth it.