I've heard of people leaving electric space heaters on overnight while they're sleeping but I would not recommend you do so because electric space heaters are known to start house fires especially overnight when people are sleeping.
If you must leave the space heater on overnight especially in your bedroom be sure that it's not near anything flammable and make sure the plug is in good condition and it sits firmly in the electrical socket without being loose.
Loose electrical connections create resistance which can heat up the outlet and start a fire.
But it's best to turn the space heater off overnight if you have other forms of heat.