You are sort of affirming my point in a way.
If you have thrown up chunks in the morning that means that it has sat in your stomach all night long. That is undigested and/or semi-digested food.
Digestion takes place in the intestines. It takes three to five hours for that semi-digested food to slowly be released from the stomach into the intestines. That is where digestion (nutrient absorption) takes place.
That food in your stomach did nothing for you between the time you ate it and threw it up the next morning. The natural process of movement, gravity and so forth is what helps the body move food through it. Laying horizontal on an full stomach of food will leave it sitting there in the stomach just as you discovered when you threw it back up.
Eat the same amount of food that you would have included in those almost-in-bed-meals while you are awake and vertical and process it through the stomach that three to five hours before bed. Then that will let the body use the nutrients that are absorbed by the intestines that are then flowing through your bloodstream to heal, recover, restore and grow your body. Not to mention that it makes the cardiac sphincter more susceptible to opening and causing acid reflux (heartburn) and
GERD.
Most will do what they want and like because they think it is what to do because such and such company markets this and that type of protein for this and that time of day. Or even worse the big guy at the gym or on the board does it yet you have no idea whether or not it has anything at all to do with his physique because some guys just grow on shitty diets regardless.
I promise you if you are getting in 300g (or whatever your amount may be) of protein a day into your body you will be in positive nitrogen balance all day and your body will not suffer one little bit for those 4 to 6 or even 8 hours before you wake again to eat.