Dear Photonate,
I am sorry this happens to you when you eat walnuts. I have not experienced this myself but perhaps others here have. I notice that eating protein rich foods, like walnuts before bed time seems to make it hard for me to fall asleep. Some people are allergic to peanuts. Unfortunately I do not know much about food allergies. Sorry I cannot be helpful to you in this.
Sincerely yours, Yao Wen