A keg should be refrigerated and allowed to sit for at least 24 hours before tapping to ensure that the beer inside is at the ideal temperature and has had time to settle. This will help ensure that the beer is properly carbonated and that any sediment has settled to the bottom of the keg. If the keg is not allowed to sit for this amount of time, the first few glasses of beer may be overly foamy or cloudy.