I always play Legacy in Act 2 after I choose my love interest and sleep with them, as they will give some interesting romantic banter in Legacy. However, the ending of Legacy in Hawke's Estate will vary depending on whether you do it before or after the quest "All that Remains." If you do it before, you get some more backstory on how your parents met, etc. If you do it after, you get a very bittersweet moment.
Also, the weapon you get in Legacy (Hawke's Key) is very nice and useful in the battle against the Arishok. You have the option to add three "powers" to the Key while in Legacy, but it is possible to add all 12 powers if you know how to use the glitch. Then that weapon is an absolute beast.
As for MotA, I always do it in Act 3 at some point, usually after solidifying things with my love interest (this is particularly important in the case of Fenris). The romantic banter is nice if you bring them along, and they get very jealous if you flirt with Tallis, which is amusing. I also enjoy the various scenes you get of your companions trying to "rescue" you, as the scene varies depending on which companions you bring (search YouTube for videos that show all of the various combinations).