It is hard when they are teething and i found that bonjela worked ok but if it was really bad then give infant paracetemol. My doctor told me it was ok to use it as it says continuously until the teething is not causing them pain.
The reason your baby is waking through the night maybe because you are feeding him/her to sleep. It is best for babies to go to sleep on their own and then when they wake they are able to settle themselves back to sleep. Also older babies will wake just to get the milk and comfort from the feeding when they dont actually need a feed.
I would only give him/her water when he/she wakes in the night. If they seem in pain with the teething then give paracetemol as well. Hope it gets better soon.