I don't know if it is an intentional feature. But, one thing for sure, it's annoying!
can you show us how to reproduce it?
can you please take a screenshot of it?
This is not a bug. Armor Stand will change it's pose whenever it interacts with a block that is being powered(this includes powered rails).
This is an intentional feature. Nitwit villagers(villager that wears green coat) are awake at night and asleep at day.
Both Hotbar and Inventory