Max Mega Menu includes a native Max Mega Menu module for Divi 5, which can be used to display your mega menu within the Divi Theme Builder (or any Divi layout).
Using Divi 4? See Divi 4.
Step 1: Set up a menu location
Go to Mega Menu > Menu Locations. Make sure Max Mega Menu is enabled for the location you want to display and that a menu is assigned to it. You can use an existing location, or click “Add another menu location” to create a new one (see Menu Location Settings).

When Divi 5 is active, the “Display Options” tab of each location’s settings will show a “Divi” option, confirming that the location can be added using the Divi Builder.

Step 2: Edit the header in the Divi Theme Builder
Go to Divi > Theme Builder. Click “Add Global Header” (then “Build Global Header” and “Build From Scratch”), or click the edit icon on your existing Global Header.

Step 3: Add the Max Mega Menu module
Add a row to the header, click the “+” icon to add a module and search for “Max Mega Menu”. Click the Max Mega Menu module to add it to the layout.

In the module settings, choose the menu location to display under “Menu Location”. The menu will be displayed in the builder preview immediately. Save the layout.

End Result
Max Mega Menu is now displayed in your Divi header. Max Mega Menu automatically raises the z-index of the Divi header section so that sub menus are displayed over the page content.

From here you can build the menu out, including changing the styling, adding a logo, a search box, custom icons etc.