I planned on taking about 5 gels in NYC during the race - 5, 10, 15, 18 and 22. My thought process was that at my size, I could probably story about 2000 calories if I carbo loaded, and would expend about 2600 will racing, so I would run a deficit of about 600 calories; so that is how much I tried to make up during the race. I don't think I ever took the gel at 18, and I know I didn't take any after that. I got to 20 or 21 one feeling pretty good, tried to drop the pack I was with, got strung out alone in the wind (2014), and cratered pretty hard finishing at 2:35 but struggling to keep it under 7:00 pace the last few miles.
When I ran my second marathon this past fall (Chicago), I went back to my original plan and stuck with it. I did not bonk, although I did suffer pretty bad calf cramps because it was on the warm side that day, resulting in me having to stop repeatedly over the last 10k. I still managed an okay split (1:14 low, 1:16 high, 2:30 high) and won my age group; but I think I had a 2:28 in me that day but for the cramps. I wish I had experimented with salt tablets before the race so that I could have used them race day to help with cramping.
I try to alternate taking in water and Gatorade every water station, but probably don't quite get there, often dumping the water over my head to cool if necessary. What's ideal is grabbing water bottles from spectators (maybe family members who are waiting at specified spots). I find the bottles are easier to drink from and you can carry them a bit and get a few good gulps and share with guys around you.
Like everything else, practice this before race day, and practice it using whatever is going to be on the race course that day. I intentionally used Power Gels (which I preferred any way as they aren't as thick as some of the others) because that was what I would be able to get at the 18 mile mark on the Chicago course, and this made it easy to only carry three gels. And practice taking it in at race speed (again, this is why I like doing my last marathon paced run in a half marathon race setting).
I also take Imodium on race day to help fight off stomach issues.