Active use of heat accumulators in the thermal system has the potential for achieving flexibility in district heating with the power to heat (P2H) units, such as electric boilers (EB) and heat pumps. Thermal storage tanks can decouple demand and generation, enhancing accommodation of sustainable energy sources such as solar and wind. The overview of flexibility, using EB and storage, supported by investigating the nature of thermal demand in a Danish residential area, is presented in this paper. Based on the analysis, curve-fitting tools, such as neural net and similar day method, are trained to estimate the residential thermal demand. Utilizing the estimated demand and hourly market spot price of electricity, the operation of the EB is scheduled for storing and fulfilling demand and minimizing energy cost simultaneously. This demonstrates flexibility and controlling the EB integrated into a multi-energy system framework. Results show that the curve fitting tool is effectively suitable to acknowledge thermal demands of residential area based on the environmental factor as well as user behaviour. The thermal storage has the capability of operating as a flexible load to support P2H system as well as minimize the effect of estimation error in fulfilling actual thermal demand simultaneously.