Poor sleep is associated with weight gain.
if you mean poor control of your body's natural drive to eat which is imperative to our survival, then sure
very few people can consistently control this "impulse" -- the best way to control it is to get adequate sleep and regulate your hormones
TLDR: weight gain is not from body using less energy but from your regulating machine being put out of balance.
Body on caffeine will still use more calories, but your brain on poor sleep will make worse choices and you will eat more just to offset unhappiness.