Diesel is having trouble starting in 40 degree weather when plugged in. on 1999 Ford F-250 Super Duty

Occurs when it's been shut off for more than five hours during the day while at work. Batteries and alternator are fine.

2 answers
try replacing the glow plugs see if that will help. if you dont want to do all of them, remove them one at a time and check their resistance.
This info is from Repairpals Common problem reports for your vehicle
RepairPal Verified "Use correct oil to prevent engine performance problems"

Using the correct oil for this engine is critical. Improper engine oil can foam in the high pressure system and not develop enough pressure
for operation. Symptoms of this can be hard starting, long cranking
time before start, rough engine idle, and a lack of power. Another sign
is tiny bubbles in the oil on the engine oil dipstick after the engine
is shut off. The additives in the correct oil that protect against
foaming can still break down, so changing the oil at the correct
intervals is important.