Highly integrated energy conversion systems need a Heat Recovery Steam Cycle that recovers heat produced by exothermic reactions (combustion, gasification, fuel synthesis) in order to generate electric power and supply heat and steam to endothermic processes and external users. Since the recoverable thermal power can be a significant fraction of the fuel power input, the design of the HRSC has a large effect on the overall plant efficiency. However, there appears to be no published study on the optimal design of HRSCs integrated with several heat sources, heat users and bleeds. In this work we propose a mathematical programming model and an algorithm for optimizing the design of a broad class of HRSCs: with or without supplementary firing, multiple pressure levels, heat recovery from multiple heat sources, heat supply to multiple heat users, multiple steam extractions. Our methodology is capable of designing the optimal steam network and optimizing the mass flow of steam raised in each tube bank in both the Heat Recovery Steam Generator and external heat sources, the mass flows of regenerative bleeds, pinch point temperature differences, pressure levels and superheat temperatures.