Bad sleeping habits: whenever you do not sleep well through the night your body produces a hormone called ghrelin which increases your appetite. Apart from that, cortisol increases as well, accumulating fat. By the way when you feel tired last thing you actually want to do is exercising, do I have to say more?
Eating too much at nights: supper should be the lightest meal of the day, it should include protein and vegetables, people tend to watch TV while having dinner, this makes you distracted about the amount of food you are putting into your mouth, of course losing weight is out of the picture.
To avoid gaining weight you should have dinner 2 hours before going to bed, by doing so your digestive system is able to work better. Eating low fat food at night is also great for your body; think about lighter food which by the way will help you with having a good night sleep as well.
Sugar should also be banned from dinner, since having it will make you accumulate fat, and therefore getting rid of those extra kilos will be impossible