What is the cause of food or liquid to come out of your nose while you are lying on your back and asleep?

REFLUX! What you are describing is frank reflux. Doesnt get much worse than this. This can lead significant problems with your sinus, ears, throat, not to mention it can lead to aspiration of the stomach contents. You should be seen without delay and possibly have an egd to look for a hiatal hernia. In the meantime, sleep with your chest above your stomach (wedge pillow) and dont eat 2 hours before bed.
Reflux. Gerd (gastroesophageal reflux disease) can cause food and gastric fluids to back up into your esophagus, even into your mouth and nose. This is especially prone to happen when you lie down. Try to no lie down for a couple of hours after your eat. Eating smaller, more frequent meals also helps. See your doc for some additional treatment strategies.