Ugh, feeling bloated is the worst. I should know because I've spent decades feeling this way. Personally, I know certain foods are triggers, so I avoid dairy and sugar, limit processed carbs like bread and baked goods, and aim to eat an apple a day to get enough daily fiber.
I've also found that drinking enough water prevents digestive issues. Since my bloating tends to be worse at night and in the morning, here's an easy habit I have that's been key to making my tummy feel happy.
I fill a reusable water bottle at dinner time. I drink it during and after the meal, making sure to finish it two hours before bed (or else I'll end up having to pee in the middle of the night). Once it's empty, I refill it and place it on my nightstand. When I wake up, I drink it first thing in the morning.
This is not only a great trick to beat belly bloat, but it also ensures I drink enough water throughout the day since it gets me in the habit of keeping the bottle nearby. If you suffer from bloating or from staying hydrated, try this easy habit of mine.