Hi Shelia,
This is an interesting topic. But what I find to be the most interesting about it is the ambiguity displayed by medical authorities when making recommendations on how to deal with such issues (allergens or immune system antagonists that are not clearly understood). Their recommendations follow a very distinct pattern:
1. If it's a food, especially one that has been traditionally viewed as a diet staple such as gluten (wheat, rye, barley), then it should never be avoided unless a clear diagnosis of celiac disease has been established in every case.
2. If it's a medication (regulated by the FDA), then it should only be avoided if the patient is known to be allergic to it.
3. If it's a supplement (not regulated by the FDA), then it should be avoided, without further consideration.
Of course that hierarchy of responses is based on logic and experience (except for the unjustified defense of gluten in the diet). It's certainly logical that one should avoid unregulated products that may cause immune system issues. And medical authorities have no choice but to trust the FDA's judgment, because that is a legal obligation. So therefore it follows that products that are outside the regulatory powers of the FDA should never be given the benefit of any doubt about their safety. Therein lies a huge fallacy of the system however, due to the fact that just because a product has not received the blessing of the FDA, does not imply that it is not at least as worthy as any of the products endorsed by the FDA (although many people, including physicians, do not see it this way).
The bottom line is that the generally accepted hierarchy of categorical responses tends to impose a huge bias upon recommendations made about the safety or efficacy of various types of issues/products. So is melatonin really risky for most people who have an AI disease?

Let's see what the evidence shows.
We have to bear in mind that we are not most people. We are a very unique group of individuals who are actively treating the cause of our AI issues, not just treating the symptoms. To my way of thinking, that is of paramount importance, because it means that our immune system is not necessarily in the highly reactive state found in most/all other AI patients. Of course we are treating our issues by either totally avoiding foods, medications, supplements and other environmental influences that contribute to our health issues, or in the case of certain items, we are minimizing exposure, or otherwise regulating the amounts ingested in order to maximize our chances of maintaining optimal health. But the point is, some items have to be totally avoided, even in trace amounts, some have to be minimized, and some are not an issue. The trick is correctly sorting them all into the proper category.
Note that we do not totally avoid every item that can cause problems (such as histamine, for example). Melatonin is similar in this regard to histamine. Many of us have to limit our exposure to histamine (especially while we are reacting or recovering), but we certainly cannot totally do without it, because it regulates various digestive and immune system processes that are vital to health.
It appears that the recommendations against taking melatonin as a sleep aid are mostly based on claims that research showed that rheumatoid arthritis patients who took melatonin experienced an increase in the severity of their symptoms. But that's simply not true. Their clinical symptoms did not increase. The researchers were initially hoping that melatonin could be used to treat RA, and they were disappointed to discover that the clinical symptoms of patients were unchanged after taking melatonin for 6 months. It is true that certain laboratory markers of inflammation increased, but cytokine production and clinical symptoms were unaffected (and this is where the rubber meets the road). Look at what the conclusions of that 2007 research report actually said:
Conclusion
A daily dose of 10 mg melatonin shows a slowly developing antioxidant profile in patients with arthritis and increases the concentrations of some inflammatory indicators, but these effects are not associated with any change of proinflammatory cytokine concentrations or clinical symptoms.
Inflammatory status and kynurenine metabolism in rheumatoid arthritis treated with melatonin
The red emphasis is mine, of course. And based on that, most of the experts are recommending against the supplemental use of melatonin. Why? Look at this research report that was published in 2013:
This review summarizes and highlights the role and the modulatory effects of melatonin in several inflammatory autoimmune diseases including multiple sclerosis, systemic lupus erythematosus, rheumatoid arthritis, type 1 diabetes mellitus, and inflammatory bowel disease.
4. Concluding Remarks
Melatonin therapy has been studied in several animal models of autoimmune disease and evaluated in patients with clinical autoimmune disease (Figure 1). For most of the autoimmune diseases discussed in this article except RA, melatonin treatment reduced the severity of disease in animal models (Table 1) and some clinical trials [93,144]. These observations suggest the importance of endogenous melatonin in the development of autoimmune disease and the possibility of exogenous melatonin treatment of human autoimmune diseases.
Modulation by Melatonin of the Pathogenesis of Inflammatory Autoimmune Diseases
Again, the red emphasis is mine. And yet the Johns Hopkins Lupus Center recommends:
Melatonin and melatonin-containing supplements should be avoided in people with lupus and other autoimmune disorders because they may stimulate the immune system.
Well Duh! This appears to be in opposition to, and to totally ignore the findings of the research report cited above.
Remember that the people who were subjects in the RA study (and any other studies associated with this issue) were not avoiding their food sensitivities. IMO we should listen to what our body is telling us in these situations, and as the old song goes, "If it feels good, do it". And obviously, if it doesn't feel good, don't do it. Perhaps melatonin might be an individual issue in some cases, but recommending blanket avoidance appears to me to be similar to a recommendation to burn down the barn in order to get rid of the rats.
Thank you for posting about this, and giving me the opportunity to explore it further. Obviously this is just my opinion, based on the research articles cited above. If I'm overlooking something, what is it?
Tex