I've attended a few week long meditation retreats where you generally have to adhere to the schedule laid out for you; that includes waking up early (~5:00AM) and going to bed early and also refraining from using anything that could be considered a distraction, namely computers, phones, etc. More often than not, a few days into a retreat I would start experiencing extremely vivid and violent dreams. One of my meditation teachers said that this tends to be a regular occurrence as the mind goes through a form of detox when it's deprived of stimuli. It was interesting to read about the parent's experience with melatonin and then be reminded of these episodes, with possible increased presence of melatonin and deep sleep states being the common factors.