MDMA has a reliable experience: it's over (with normal doses!) within 4 to 6 hours. It is difficult to extend it since once you've used up alot of the serotonin, it takes a while to accumulate again.
Taking additional stimulants such as caffeine or guarana (caffeine, theophylline, theobromine), may not really help that much, and will definitely put more strain on your overworked brain that night. It will also make sleeping very difficult (for most people).
If you are using MDMA over a long period of time (years) you may want to consider that if there is "brain damage" from MDMA usage, it would most likely be compounded by sleep deprivation and further stimulant use (and I'd say that counts ESPECIALLY for trying to extend a night out of fun).
Some people had a few good ideas posted already. Either delaying MDMA until later in the night, and start off with a little LSD or mushrooms, but I think it is best to leave MDMA to the middle part of the night so that by 6am you should be able to want to leave the club/party, and start the repair process
caffeine, vaffeine, theophylline, theobromine.... all will add to the excitatory stress on your brain, and heart.