Well sort of.
Actually, a poor sleep routine can seriously undermine a healthy diet, which leads to eating the wrong foods at the wrong times which in turn leads to putting on weight, making it difficult to lose weight or keeping weight off.
Or put another way, when we're tired, we're more likely to snack on bad stuff that makes us fat, so a way to avoid snacking on bad stuff that makes us fat is to make sure that we're not tired. Which won't be the case if we don't get the sleep our bodies need.
Also, if you eat healthily then you're more likely to sleep well, as a healthy diet already contains the goodies that can contribute to good sleep...magnesium, potassium, calcium, Vitamins B & D.
So if you eat well, you're more likely to sleep well and if you sleep well, you're less likely to eat badly.
And you'll be less likely to get, stay or go back to being fat.
I think that's what's known as a virtuous circle.