Leaving a pool heater on all night is usually not worth it.
Probably not. For gas or propane heaters, you’re just burning money heating water that’s going to lose most of its heat overnight anyway. For heat pumps, they’re efficient but still running all night makes little sense unless you need the pool hot first thing in the morning.
The bigger issue is that pool water cools down fast at night because evaporation is brutal. A cover helps, but even then you’re fighting an uphill battle. A gas heater running for 8 hours will cost you a surprising amount. Most people are better off setting a timer to kick on a few hours before you want to swim, then let it coast.
Heat pumps are cheaper to run but slow to heat, so leaving them on overnight might get you a few degrees over the course of the night. That’s fine if you want the pool ready at sunrise, but check if your pump can handle continuous low-speed operation for that long without frying the contactor.
If you have a solar cover (the bubble wrap kind) and a heat pump, overnight is okay but still wasteful. If you have a gas heater and no cover, definitely not.
Save the money for chemicals instead.