I may have gained quite a bit of weight in the past few months, but when I was physically active, I always consumed whey protein right before working out and in the morning. I gotta tell ya, it REALLY DOES WORK. The only thing that I would advise is that you don't put the powder in the wrong item. Putting the protein in whole milk isn't advisable as you'll gain weight.
However, if you mix the powder into yogurt or low fat milk, you're setting yourself up for success. It's low-cal, but high in protein (which is exactly what you need). Of course, if you're looking to get a bodybuilder's physique, a high calorie diet MAY be good (but this is a weight loss forum -- so I don't advise it. lol).
Either way, I take it right before working out and in the morning as a breakfast. Never heard of consuming it right before bed, but I don't see how it could hurt.