I've definitely dealt with this situation before, and the thing nobody mentions is that hotels literally track which rooms are problem areas. That ice machine room? They know it's loud. If you'd spoken up, they would've moved you without any hesitation because front desk staff have a whole mental map of which rooms to avoid and which ones are solid. They deal with this constantly.
The key thing is timing though. If you mention it right away - like that first night or first thing in the morning - they can almost always shuffle you to a different room same day, especially at a bigger chain like Marriott. But if you wait until checkout or after you've already left, there's not much they can do except credit your account for a future stay. Front desk won't think you're being difficult; they'll actually be grateful you let them know instead of just trashing them in a review later.
Next time don't sweat it. Just go downstairs, be casual about it, and say something like "hey, the noise from the ice machine is keeping me up - any way you could move me to a quieter spot?" That's it. They've heard worse complaints and would much rather fix it on the spot than have a guest miserable all night.