What is food grade lye
Pure lye is by itself always food grade. There is nothing toxic about lye (although it's corrosive even at low-ish concentrations).
When a manufacturer sells you food grade lye, they are guaranteeing you that it is not contaminated with anything unpleasant. After all, a chemistry plant will make a lot of different chemicals using the same equipment, and you don't want to use lye which was mixed in the same erlenmeyer flask as a batch of pesticides. Also, the equipment used in an industry processes can leave unpleasant traces too, some search shows that one of the more common setups in the 20th century used an asbestos barrier for the electrolysis process of lye creation.
The problems of making lye from sodium and water at home
If you make your lye at home, you'll only have to ensure that your ingredients are food grade. There is nothing in the process which can make the lye accidentally toxic. Even if you use wrong ratios: if you add more water than intended, your lye will be diluted, which does nothing bad, and even makes it less corrosive. If you add more sodium, you get more concentrated lye, which you can dilute. You don't need any catalysts, solvents, or other intermediate reagents about whose possible residues you should worry. All you need is food grade sodium.
But here we come to the first problem with your plan. It is much easier to find food grade lye than to find food grade sodium. Retail lye is used for household purposes, including baking pretzels and cleaning cooking utensils. I don't know of any use for retail sodium beyond seventh grade chemistry class demonstrations.
The second problem is that storing pure sodium at home is a PITA. First, you'll need to find some food grade liquid for the airtight seal, and it will react with cooking oils. You obviously don't want to use kerosene, so you'll probably need to get medicine grade liquid paraffin. Should you ever have a fire in your kitchen, the sodium will also burn with a much hotter flame than anything else around, and you probably won't get it extinguished until it has burned itself out - non-watery fire extinguishers are not very effective on it, and water-based ones will actually accelerate the fire.
The third problem is that you should pay lots of attention during the reaction. Sodium powder is prone to spontaneous explosions. Luckily, there isn't that much chance that you'll produce powder from it unwittingly. But the byproduct of the reaction, pure hydrogen, is also explosive when mixed with air at certain ratios, and you cannot control the ratio you produce.
The fourth problem is that the reaction is quite exothermic. You can mitigate it somewhat by adding very small amounts of the metal to the water (but not small enough to make a powder), but you'll still get some heat development. And it is happening right under a possibly explosive hydrogen-air mixture - not a good idea.
So my recommendation is to just buy food grade lye and use that. It will save you from lots of headaches.
The problems of making lye by brine electrolysis at home
You clarified that you had planned to use electrolysis. This is possible, and sodium chloride is certainly a more benign ingredient than pure sodium. The resulting sodium hydroxide should be safe for consumption. Still, I think it's more trouble than it's worth, and purchasing commercial lye is the better option.
First, you still have to manage your byproducts. You'll get elemental hydrogen and elemental chlorine bubbling up. You don't want either of these gases floating in your living space, hydrogen being explosive and chlorine plain poisonous.
Also, if you want a decent lye concentration, you usually do the reaction in a container where the electrodes are separated by a semipermeable barrier, else it reacts right back to salt. The problem is that your product will corrode most barriers quickly. I have done it as a kid in a u-shaped part of a drinking straw, with a piece of sponge in the middle. The lye ate the sponge away, and before that the chlorine turned the water in its part sickly green (yes, you have to dispose of that byproduct too somehow, it doesn't get out so quickly).
If you use this method, it will be very hard to either find a barrier which is not corroded by the lye, or accept some corrosion but make sure that the product (which will contaminate your lye) is not harmful when eaten. Then there is the part about electrodes Wayfaring Stranger mentions in a comment: you want to choose a cathode material which is not dangerous when ingested, especially no heavy metals. To complete the equipment safety part, use a glass container for the whole bath, not a plastic or metal one. And of course, don't use phenolphtalein drops to check for the proper concentration, get dry strips for dipping.