At 3 months of age the baby will usually sleep between 4 to 5 hours without waking up for a feeding so the 3 month old baby can go 4 to 5 hours without eating.
But if the 3 month old baby goes through the night without waking up to feed it's perfectly okay but if you think the baby is hungry then you can wake the 3 month old baby up to feed them.
Usually the 3 month old baby will wake up and start crying for you to feed them so they should let you know if they need to eat.
If the baby doesn't wake up wanting to eat during the night then it's perfectly fine.