Midna knew she had to return to the twilight realm, and she also knew that she was getting too close to Link. She did the right thing and I think it was a perfect ending, you could even see Link smile when he turned back around and Midna was gone. It's actually the perfect, romantic, story-book ending; the whole aspect of "forbidden love" as used in, for example, Romeo and Juliet are the exact same "genre", if you will. The main characters slowly grow closer and closer together as they live through an amazing adventure to fight evil, then comes the moment where one of them has a choice between leaving (in one way or the other) and save the world, or stay and risk evil returning. The best part is that this is Zelda, and it's very interesting to see this extremely famous way to write novels was used in a game such as this, it wasn't *very* obvious and it wasn't very typical of the game series' M.O. Quite refreshing and fun to see it in that angle.
Skyward Sword had similarities in the use of "forbidden love", but it didn't fulfill the criteria of either of the main characters dying/disappearing.