Unless it keeps you from sleeping well, I don't see it as a problem. If you are gaining too much fat, I'd say it's more likely that you're just carbing up too much for that meal, more than your body needs, rather than it being from consuming it right before sleeping.