Maladaptive daydreaming can definitely result from trauma, but that's not the only cause. In general, anything that causes you to significantly prefer dreams over reality can contribute to normal daydreaming becoming maladaptive. Bullying, self-esteem issues, neglect or abuse, mental illnesses, etc. all have the potential to cause MD.
Don't give up what you want most for what you want now.