Though no one really understands why, sleep deprivation seems to affect executive brain function in particular, and poor decision-making is often the end result of the disinhibition that can occur in your brain's frontostriatal executive-reward circuitry. The best thing you can do is make sure that you're eating enough of the healthy foods your body needs, especially if you are breastfeeding, and this should help to calm cravings (though not entirely).
If you are breastfeeding, your body needs a minimum of 500 calories in addition to what it normally would to sustain lactation, so it's unsurprising that you're reaching out for extras. Listen to your body, and try to eat foods that are packed with micronutrients. Ensure you're getting enough calcium, iron, folate, vitamin D, and iodine in particular. Postnatal nutrition is just as important for your body's recovery as prenatal nutrition was for a healthy pregnancy, so keep it in mind! Also, don't be too hard on yourself trying to be supermom, losing the baby weight immediately while being a perfect mother, partner, etc...don't drive yourself crazy and take it slow! You have your children's whole lives to make good decisions and live healthily, so do it in baby steps.