- The primary purpose of this paper is to perform optimal energy management in a distribution network (DN) consisting of several microgrids (MG). A cooperative game method has been used to achieve the best coalitions to diminish the total system costs. A fair profit-sharing procedure is defined as the individual contribution value (ICV) to share profits between players. In addition to ICV, as an economic indicator, the DN's maximum voltage deviation (MVD) in each game has been used to allocate rewards to each game's players (MGs). Studies have been executed on a modified 33-bus DN consisting of three distinct MGs. In the system under study, there is no direct connection among MGs. The case study also deliberates the uncertainties of RESs and technical real power losses in the DN considering demand response program. The paper results concede that despite the reduction in the costs of MMGs due to the application of DRP, it is still possible to reduce the total costs of an MMG system by forming coalitions and adopting proper procedures to profit allocation. In addition, the proposed profit-sharing method based on ICVs and MVDs is simple, consistent, and clear, thus facilitating calculations. Examining the games one by one also identifies the inappropriate games/players to form a coalition and helps reduce problem size in the upcoming scheduling. Solutions obtained through the combined use of ICV and MVD indicators are more profitable, have better technical characteristics, and lead to larger alliances with more MGs participation, increasing network flexibility.