Here we have a guide looking at how you can catch legendary Pokemon following completion of the main game in Omega Ruby and Alpha Sapphire.
First, Heatran can be found in a cave on Route 120 by going through the portal at the bottom. For Lugia or Oh-Ho (depending on which game you have), go to the bottom of the Sea Mauville and find the hidden scanner. Then you need to go to Slateport City and head to the shipyard.
Hand the scanner over to Captain Stern, who'll give you a clear bell. You need to head to the top of the Sea Mauville to catch Oh-Ho or, if you got a tidel bell, you need to the basement again to find Lugia.
The other Pokemon can be found by soaring, but only when specific conditions are met. What you need to do to catch each of these Pokemon is detailed in the video by Verlisify below.