If the mega menu has been applied on a master page, so you can apply the same master page to all site collections within a web application using the below PowerShell Script
$site= Get-SPSite HTTP://webappURL #rootsiteURL
$WebApp = $Site.WebApplication
foreach($spSite in $WebApp.Sites)
{
foreach ($web in $spSite.AllWebs)
{
$web.MasterUrl = $site.RootWeb.ServerRelativeUrl + "/_catalogs/masterpage/YourMasterPage.master";
$web.CustomMasterUrl = $site.RootWeb.ServerRelativeUrl + "/_catalogs/masterpage/YourMasterPage.master";
$web.Update();
}
}
Repeat the above steps for each web application on your farm
Note: I would suggest creating a new web application with multiple site collections on a test environment to test the above script before applying it on the production