Well, my 5-month-old gets up at night every 2 to 3 hours to nurse too. He is breastfed but will take formula in a bottle if I step out.
I had to be on medicine for my sinuses for 15 days (and he had only formula then), and his sleeping was no different.
I think he needs to nurse to get back to sleep, probably, to some extent. We're in the same situation! With my daughter I just stopped nursing at 15 months, and then she slept. But, 5 months is so young. I'll just continue feeding him on demand for now. My son (3) eventually stopped needing milk at night, all on his own, somewhere over a year.