First and foremost, don't stress. You will be perfectly fine. Stressing will do nothing but prolong and exacerbate whatever your ailment is.
Now that we've got that out of the way
the main thing you need to know is that the drug itself (assuming it WAS MDXX, which without having tested it you can't really be sure) is well and truly out of your system and no longer having any affect on you. Whatever is happening is likely an after-effect of the drug, though it's very unlikely it's something you should be seriously concerned about - at least from the way your post comes across. If it were, you would likely not be here posting and would be on the way to hospital anyway...and if you WERE posting, you'd probably be in a much worse way and your post's wording etc would likely reflect this.
You'd be surprised to learn just how powerful the mind is when it comes to making stuff that's "in your head" real - it's pretty much the power of placebo, only you're the one giving yourself the placebo in the form of excessive worry. You probably just had one random shitty sleep/sensation that in actual fact had nothing to do with having taken MDMA, and suddenly your mind is off on a race of "oh no what's wrong think think think stress stress stress PANIC!!"....if you get what I mean
Just try not to think about it so much. You'll probably find that once you forget about it for long enough, suddenly your symptoms will vanish.
That being said, if you're sure that it's not just in your head and that you are experiencing some negative after-effects, ensure you're eating healthy, getting as much rest as you can (when you can), and do some light exercise (might even help run you down > get to sleep).
If you're STILL up shit creek, consider medical attention. To be honest, you don't seem as though you're in any bad way - though you know this much better than anyone else will, particularly over the internet. Listen to your body (but do tell it to shut the fuck up and stop being a bitch sometimes
)
Good luck
EDIT: FWIW, my girlfriend struggled to sleep at all for 2 nights after her first roll (including the night of the roll). It definitely freaked her out, though since then she's had no real issues. Funny, coz I'll take MORE MDMA than she does, I'll drop LATER than she does, yet I'll be out like a fkn light the moment my head hits the pillow when I get home bahahaha