especially if it is a clear cold night with no wind, with air having a relatively high dewpoint, fog risk is high, seek higher ground away from water bodies (ie. avoid bottoms of valleys) and low lying areas of ground with perhaps a little more of a breeze
if you are in the mountains, try to camp below the cloud line and above the valley cloud line
the more moist the ground, the higher the chance of fog
avoid camping over grassy areas which have higher moisture contents and more likely to form dew or fog
a rapidly clearing sky after rain increases the risk of fog, especially if there is little wind
you are much less likely to have fog on the downslope of a mountain than an upslope in terms of wind direction
morning sun will tend to dissipate fog rapidly by warming the ground and it will help to dry out your tent/tarps/etc.