In theory you can bolus a number of times a day if youneat carby snacks. I often have such snacks and have some insulin (I'm on a pump) However, I tend to avoid doing that really close to bedtime in case I misjudge and go low during the night.
If you choose to snack, my advice would be to not have too many carbs and to test two hours after, setting an alarm if necessary. Or you could have a non-carb snack then if you prefer.
So - yes, you can, but you'll need to,watch you don't go too high or too low after.
(I'm presuming you're counting carbs and are able to,adjust your insulin appropriately)