Hello: That gravity loop is probably the problem 😕 The check, or one way valve almost certainly is not closing. It has limed up in the open position after years of sitting that way. What’s happening when you draw water is hot comes from the top of the tank and cool+sediment comes off the bottom. Fixing this will give you clean and hotter water.
The best fix from my point of view is to put a demand controlled pump in place and use a spring loaded check valve instead of the swing check that is likely in place now. Have a look at http://www.gothotwater.com.
A test you can do to prove this theory is simply to close off the gravity loop and see if the sediment problem stops. It will take longer to get hot water, but it’s all in the name of science and domestic tranquility 😎