Increasing power system flexibility by responsive demand is a central issue for the incorporation of higher levels of variable wind generation in future power systems. The electrification of the heat sector, except from energy efficiency gains, may offer a vast potential of new forms of flexible demand, by time-shifting of heat production in buildings. The assessment of this potential can, however, be performed only when the limitations imposed by the primary operation of the equipment (space heating) are realistically taken into account. In this paper, a methodology is presented for the quantification of the flexibility offered by the thermal storage of building stock equipped with heat pumps, to power systems with significant penetration of wind power. A model is proposed for the incorporation of the building stock thermal behavior as equivalent energy storage in electricity market models. At the same time, the model allows the coupling to a detailed dynamic thermal model of buildings for the assessment of the respective operational restrictions. The case study presents the results of a project for the evaluation of the flexibility offered by portfolios of high heat pump deployment in conjunction with high wind penetration scenarios for the future German electricity system.