You can eat week old mashed potatoes as long as the week old mashed potatoes have been kept refrigerated.
I have eaten week old mashed potatoes myself that have been in the refrigerator and sealed in a food container.
Just make sure the week old mashed potatoes do not have any mold in it and does not smell bad.
If the week old mashed potatoes smell bad or have mold on them then throw them out to avoid getting sick.
If in doubt throw them out.
If the mashed potatoes have set out overnight they are likely fine as long as you have not put any milk or butter in the mashed potatoes.
If the mashed potatoes that were left out overnight contain any milk, butter etc then it should be thrown out because the milk and butter can spoil overnight.