Not it's not bad to eat something at night if you're feeling hungry.
I get up at night sometimes and eat a small midnight snack or make a sandwich or eat a bowl of ice cream.
I have to get up anyway to go to the toilet to pee so I'm already up and near the kitchen and I cannot go back to sleep at night until I have been awake for at least 20 minutes or so.
Then after eating something and having some tea or juice or even a glass of water I then can more easily fall back asleep.
As long as you're not overeating and eating too much food at night then it should not be a problem to have some food in the middle of the night when you wake up.
If you're hungry it's a good idea to get up and eat something and then go back to bed as it's hard to sleep when hungry.