Keep tan longer is one of the objectives that everyone, after summer, wants to reach.
Despite the preparation of tanning before summer, diet has no big effects on keep suntan. Carrots diet are good for healt, but only because is important to eat vegetables, and before you get tan, not after.
Skin is already rich of melanine (pigment) and melanocytes (cells that make melanine).
What you can do is a judicious use of moisturizers and aggressive soap.
Skin has a renovation cycle of 28 days (that change depending subject and zone) and to keep the skin tan, you have to avoid a too fast dead skin replacement. So drink water, and use moisturizers, but avoid scrub and peeling treatments.
Remember furthermore that skin exfoliates easily with dry air, so avoid air condition and long airflight.
A tanning machine cycle is highly suggested, in this case the best choice you can make is to use high pressure devices, sunshower or tanning bed, that gives color to the melanine that is already present in your skin. Low pressure (with tubes) devices aren't so effective in this case (while are suggested before summer).
A sunbed or tanning booth session every 10-15 days should be enough to keep your tan for a long time, without have a big stress for your skin.