Hi Dom,
pH fluctuations in an aquarium arise from concentration ( ie hydronium per gallon ). In the ocean, the concentration of hydronium ions remain constant between night and day because the scale or sheer size of the ocean cannot be so easily affected over a period of hours and is more or less 'rebooted' diurnally. pH is a mathematical representation where 'p' stands for '-log'. it is the inverse measurement of the amount of hydronium ions in a certain amount of water. A hydronium ion is a water molecule with an extra hydrogen added to it, so instead of H2O, you now have H3O. This extra free Hydrogen comes from a natural reaction between H2O (water), CO2 (carbon dioxide) and CO3 (carbonate ion). All happening simultaneously and with countless amounts of each compound involved, the two hydrogen (H) break from their bond in water and move to the less stable carbonate ion (CO3) in an effort to electrically stabilize its' charge. This new compound comprised of water and carbonate is called bicarbonate (H2CO3)- this is essentially what you are adding to your tank through the addition of baking soda (sodium bicarbonate or NaH2CO3). The sodium (Na) is what is called a 'spectator ion' and irrelevant in this reaction and in your tank. So, from our original ingredients we now have one Oxygen from the water compound (O) floating around, a CO2 and our new H2CO3 compound. The free (O) will bind with the CO2 to form a new carbonate (CO3), thus replacing the one that H2CO3 took and CO2 is replenished from the atmosphere. Now we've established how 'baking soda' (minus the Na) is naturally formed in your aquarium. From this H2CO3, which is floating around in a bunch of H2O's, a H can sometimes become separated and bind with a water (H2O) to form a hydronium (H3O). This hydronium is what pH is. Now let's look at this in terms of day and night. During the day, there is more free oxygen in the water (mostly from photosynthesis). The amount of oxygen offsets the amount of CO2. This slows the cycle at the point which CO3 can be made- less CO3 equals less H2CO3. if there is less H2Co3, then less H3O can be made which leads to a higher pH. Remember, pH is inversely proportional to the amount of hydronium. Higher pH equals less hydronium (I always have to pause and think that through.. math). So, if the problem is a low pH at night (more hydronium) the answer is to boost the oxygen levels at night to offset synthesis of carbonate ions. Oxygen and CO2 levels don't really change according to night and day in the ocean due to its' magnitude. This is often done through the addition of a refugium with a photoperiod opposite that of your main tank. You'll be getting oxygen through photosynthesis of macroalgae in the refugium. Adding baking soda is only ever a temporary fix (like, a few hour fix-maybe a few days depending on the weather) because it is in greater concentration than CO2. It can't effectively degrade down to its' useful form without CO2 present. you're sort of adding a bunch of baking soda and only a small amount of it can really do anything unless CO2 is simultaneously added in the same proportion. Anyway, lights on in tank during the day and lights on in refugium at night. Your tank will eventually find a good equilibrium with this system- unless you're growing a lot of SPS, but that's an equally as long explanation. Also, if you understand all this you pretty much understand the process of ocean acidification and global warmings affect on the sea! This is a simple process when explained through pictures and diagrams. as with most things, it's the jargon that makes it difficult.
Good luck to you,
Conor