Yes you can keep mashed potatoes overnight and eat the mashed potatoes the next day.
However make sure to refrigerate the leftover mashed potatoes when keeping them overnight.
If you leave the mashed potatoes out overnight they can grow bacteria on them and then they could make you sick so if you left mashed potatoes out overnight at room temperature they are likely unsafe to eat and should be thrown out.
However if you do eat the left out mashed potatoes it's done so at your own risk but you could get sick so it's not worth it.
But when kept in the refrigerator the leftover mashed potatoes should last for 4 to 5 days.
You can also freeze the mashed potatoes and they will keep for up to 6 months.