I have got this habit of engaging the gear mode to neutral when I am in a smaller downhill and engaging back to drive mode if I need to further slow down or speed up. The primary objective of this habit is with an eye on fuel economy. But is it really a good habit to be followed since I'm a bit skeptical that it may affect auto transmission adversely.
Your question is in a grey territory. It can't be said "stop doing that right now" but at the same time it can't be said "keep doing that it's perfect."
A transmission is designed to operate during normal driving conditions without driver intervention. Going up hills and down hills is not a concern. Some SUVs have a feature that allows safely descending a very steep incline, but that's really and acceptation to the rule.
At the same time constantly shifting the transmission is causing unnecessary wear and tare. If the shifter in your car has a theoretical mean time between failure of a million cycles then it will last a long time under normal driving conditions. If your shifting your car 12 times every time you drive then it will fail sooner.
This is like doing a shot of vodka every day. It won't kill you today or tomorrow or even next week. Collage students live their lives like this for years. It becomes far more difficult to say that doing that one shot a day will shorten your life and by how much.
Assuming that we're talking about a vehicle with electronic fuel injection, leave it in drive. You'll actually use more fuel shifting into neutral.
When you release your foot from the accelerator, the throttle position sensor will signal the computer to cut all fuel injection. For the duration of the hill (or as long as you keep your foot off the accelerator) you will use no fuel at all.
However if the engine RPM falls below a certain point, the ecu will introduce fuel again so the engine won't die. This is exactly what happens when you put the transmission in neutral while coasting. Instead of using no fuel at all, it has to use some to keep the engine idling while you're coasting.