I struggle a lot with the question of when to eat.
I try to consume as much food as I can right after a work out. This is when I have a protein shake, and it's usually with tons of sugar in it. This is pretty much the only time I consider it to be productive to load up on sugar.
This post-workout window (about 90 minutes) is also the time during which your body will actually absorb/make use of protein the best. Most times, your body can only absorb so much, and I believe it's much less than 30 grams. After a workout, your body can absorb 30+ grams of protein. If you consume too much protein, you'll know it, because you'll be farting a lot more than normal.
A lot of people suggest protein before or during a workout, but as it sounds like for you (Phillawer), I find that this makes me nauseous and gross during my workout. So if I'm doing a morning workout, I will try to eat light carbs beforehand. Like a bagel or oatmeal. If it's too close to when I workout, and I haven't eaten, I will sip gatoraide during my workout. This gives me enough energy to get through it, without wanting to throw up the whole time.
For the rest of the day, I try to eat as much as I can. I personally have a tough time actually eating 3000 calories, which I know is the bare minimum for my body if I want to grow. So I pretty much try the seafood diet (as someone else on here called it): I see food, and try to eat it. I try to make sure it's not sugar (unless during or right after a workout), and not alcohol. For me, for this to work, that means eating every 2 hours, or 3 at the most. Lots of veggies, but lots of carbs and fats. An afternoon protein shake on top of whatever other food. And at night, I drink a protein shake before bed. I usually still wake up starving in the middle of the night, so I've been trying to eat almonds or some other fatty food that takes longer to digest and process. It works some nights. I'm also going to start putting a banana on my bedside table, so that I can eat something.
Last night I woke up at 4AM and couldn't get back to sleep, but was too lazy to go get food and didn't want to wake up my roommates. So I grabbed the peppermint patty that I had bought for my partner that he hadn't ate, and scarfed it down. This was enough to let me sleep. Not the healthiest, but it worked.
Hope some of that helped. It's basically what's been working for me to put on muscle mass (extremely) slowly. Your results may vary