It would be best to refrain from eating or drinking anything hot or cold immediately after obtaining a filling. This is because doing so could cause involuntary contraction or expansion of the tooth or the restoration, leading to a fracture or dislodgement of the latter. As a result, you might have to suppress your desire for coffee for a few hours after leaving the dentist.