The first and most obvious point that you need to keep in mind is that the food in your belly needs to be digested before you sleep. But is it even possible in todays world? Because the first thing you ever want to do after eating is to lay down and rest.
Doing that or sleeping after eating causes digestive problems because youre not in an upright position which is the preferred way for your body to digest food. And if you do it continuously, then it can possibly lead to a number of digestive diseases. The recommended amount of time to eat before sleeping is around two to four hours. This will give your body enough time to digest the food in an upright position.
Another point to keep in mind is to stay away from heavy foods prior to eating. Foods such as pizza, burgers or any fried foods are too difficult for the body to digest and are extremely calorically dense. These are one of the major reasons to gain weight and increase digestive issues in your body. Digestion is an automatic process of the body and it wont stop if you sleep right after your dinner but muscle contractions and stomach motility become slow when you're sleeping, so a heavy meal could leave you feeling queasy and nauseated.
That said, you shouldn't avoid eating if you're hungry, since a rumbling stomach can also keep you awake. Eating a very light, a protein-dense snack may be helpful.