For the most part I hate long dungeon crawls. They usually become tedious and lack the ability for much role playing.
That being said there was one that I totally enjoyed. The DM made a complete world underground with all kinds of races both good and evil. We were trapped and had to find a way to survive which meant making alliances getting involved in local intrigues and politics. We were motivated to keep exploring because we were looking for away home. So we had sessions with your standard dungeon crawls and other sessions with a lot of puzzles, role play and intrigue.
The best advice is to take your clue from the players if they start acting bored and make it plain they want out then make sure you have a way to get them out.
This is pretty key right here. The megadungeon isn't a single adventure, it's a campaign. You wouldn't want to play in any campaign that was just fight after fight after fight. At least, I wouldn't. You need something of a story, something to draw the players in and get that all important buy in.
Unlike say, something like a lair, where you have a big critter and maybe a handful of other critters, designing a megadungeon is closer to designing an entire city or even world. Sure, it's a small world, but, it is an entire one. The players are going to be spending a heck of a lot of hours in here, so, make it interesting. Again, sure, it's a megadungeon, so, it's going to have a pretty high hack factor, but, even then, the combat has to lead somewhere. Killing and looting is fun, but, gets stale after a while.
You could draw things out, or use something like Maptools and a computer screen just to show the players where they've been and where they can go.
Oh, and another piece of advice, have about 25% of encounters outside of rooms. Don't have every encounter behind a door or through a doorway. Have the players bump something while they're going from A to B. It makes the setting far more dynamic, for one thing, but also makes the players much more attentive, because now they're not just "unfogging the map" between doorways. Sometimes things can pop up in unexpected places.
And, one more thing, add verticality to your dungeon. Do NOT have everything on a level on a flat plane. It's boring. Put some stairs in, maybe a ramp or three. A room with a 30 foot ceiling where the exit corridor on the other side of the room is 25 feet off the floor. Again, this will add a lot of interest to the game. It seems so simple, but, it's surprising how much more the players pay attention when you start changing up the verticality.