You can let it marinate for half an hour or overnight for deeper flavor.
If you decide to marinate overnight make sure it's only the chicken, garlic and dill. You can add the potatoes and onions right before baking, because potatoes will turn color when peeled and left overnight.