What is the cheapest way to heat an outdoor pool?

I'm looking at air sourced heat pumps but I would still need to use electricity to run that and the pool pump and filter. Would it also mean I'd have to run all of this during the day as it's warmer but then I won't benefit from cheap night rates on the electricity.