Yes, you can leave a table lamp on all night, especially if it uses an LED bulb. LEDs stay cool, use very little power, and are made to run safely for long hours. Just make sure the lamp is in good condition, sitting on a stable surface, and not covered by anything that could trap heat.