Depends on how hard you plan on exercising. People spend all night on the dance floor while on MDMA which is the equivalent of an aerobic fitness workout, so just a bit of that is fine. Doing stuff like 5km run or heavy weights is something else, they put a lot more intense strain on your body, particularly your heart, and I wouldn't advise doing them.
People have been known to have heart attacks combining ephedrine and exercise. Stimulants make you think you have more energy than you really do. Just because you feel you can benchpress 150kg doesn't mean you can, or that you can run 2km in 6 minutes off the bat. Doing so (and assuming you didn't die in the attempt) would result in severly fucking your body up and once you come down and stop moving find most of the muscles in your body are torn, strained or pulled, making the next week very painful.
Where exactly are you planning on taking the E? In a gym, at home etc? Are you and your friend planning on going somewhere afterwards or are you just taking the MDMA for the hell of it?