It’s called telogen effluvium. That can happen with any diet where you go through transitory periods of caloric deficit. The way hair grows is that each follicle goes through 3 stages;
Anagen (Growth) where the hair uses a lot of energy to grow - this phase usually lasts 3-6 years
Catagen (Change) where the hair stops growing and lasts a few weeks and the root of the hair grows into a club that anchors the hair into the follicle but it’s not longer capable of growing.
Telogen (Rest) where the hair just sits there waiting for around 5-6 weeks until eventually it falls out.
And the cycle repeats.
Normally every hair on your body is randomly in one of these 3 phases, and you don’t notice hair fall because less than 100 hairs on your body every day are falling out.
So think about when you went on a ketogenic diet. Your cells had been used to abundant glucose all their lives, and suddenly you change the program to giving them mostly fatty acids to run on. They will adapt to become better at using fatty acids but that doesn’t happen over night it can take 2-6 weeks during which your available energy for optional tasks is limited and your cells miserly dole out energy just to critical tasks.
Optional uses of energy include growing hair, extending nails, replacing the proteins in your skin, making extra enzymes just in case, running your immune system at full strength, keeping your body temperature at 37.2C instead of at 36.1C … all of these are optional processes that can be furloughed until after a few weeks you have abundant energy again.
So what happens is when their is a drop in energy more hairs than usual will switch from anagen (growth) to catagen (change) to telogen (rest) and about 100 days after the change in energy availability you see more hair fall out every day than the 100 you normally see purely by random.
The good news is that all those hair follicles will enter the anagen phase at the same time and a few months down the road you might have thicker hair than you traditionally did.