The upward trend of adopting Distributed Energy Resources (DER) reshapes the energy landscape and supports the transition towards a sustainable, carbon-free electricity system. The integration of Internet of Things (IoT) in Demand Response (DR) enables the transformation of energy flexibility, originated by electricity consumers/prosumers, into a valuable DER asset, thus placing them at the center of the electricity market. In this paper, it is shown how Local Energy Markets (LEM) act as a catalyst by providing a digital platform where the prosumers’ energy needs and offerings can be efficiently settled locally while minimizing the grid interaction. This paper showcases that the IoT technology, which enables control and coordination of numerous devices, further unleashes the flexibility potential of the distribution grid, offered as an energy service both to the LEM participants as well as the external grid. This is achieved by orchestrating the IoT devices through a Consumer Digital Twin (CDT), which facilitates the optimal adjustment of this flexibility according to the consumers’ thermal comfort level constraints and preferences. An integrated LEM-CDT platform is introduced, which comprises an optimal energy scheduler, accounts for the Renewable Energy System (RES) uncertainty, errors in load forecasting, Day-Ahead Market (DAM) feed in/out the tariff, and a fair price settling mechanism while considering user preferences. The results prove that IoT-enabled consumers’ participation in the energy markets through LEM is flexible, cost-efficient, and adaptive to the consumers’ comfort level while promoting both energy transition goals and social welfare. In particular, the paper showcases that the proposed algorithm increases the profits of LEM participants, lowers the corresponding operating costs, addresses efficiently the stochasticity of both energy demand and generation, and requires minimal computational resources.