When did this start? Has any electrical work been done on the truck? Do you have a trailer light connector added to the truck?

Check the grounds, check the bulbs, check the connectors, check the wiring.

I once had a problem in another vehicle with a broken conductor inside a tail light socket. The broken wire was the ground conductor and the problem showed up at night when the brake light would not work, in fact the tail light would go off when the brakes were applied. In the day, things worked normally. Turns out the brake light was finding a ground path through the parking light, until the parking light was turned on, that is. Parking light would in turn find ground through the brake light, again until the brake light was turned on.