Over the past few years, nighttime eating has been studied more. We are only beginning to understand this problem. It's been in the news some since there have been cases of patients eating in their sleep while taking certain sleep aids. There is a good article in the August edition of the Journal of Clinical Sleep Medicine that reviews nighttime eating and its association to restless legs syndrome RLS).
In summary, the study authors explain that nighttime eating is common among RLS patients. In some cases, sleep aids contributed to the nighttime eating. Medications used to treat RLS may improve the nighttime eating as well. Finally, in patients with insomnia but without RLS typically do not have nighttime eating while taking sleep aids. Therefore, the authors concluded that there is something about RLS that triggers the nighttime eating in patients taking sleep aids.