Diphenhydramine and MDMA (what should be in your Nyquil and "Molly") interact, but usually not dangerously so and I hardly doubt there would be any problems unless you took the two at the same exact time.
MDMA is excreted rather quickly as well, so yeah after 48 hours you should be fine taking that.
But just as an aside, if your "Molly" keeps you up for 48 hours, it's rather likely there is something other that MDMA in there. Meth, piperazines and cathinones are substances that can keep you up for that long easily, with MDMA that would be extremely hard. Serotonin (a natural neurochemical in the brain) is converted to melatonin which is a chemical used by your brain to tell you when you should be tired. So higher serotonin levels = higher melatonin levels, which means that MOST people are quite tired after taking real MDMA.