OTC stool softener is the most immediate relief.
For Foods it’s mostly individual in nature.
Greens - Spinach,Salad,green apple
Prunes- or prune juice microwaved to a heated but drinkable temperature
Coffee - drank asap after awakening usually 2 cups.
Sometimes more importantly it’s what you are eating. Large amounts of bread and or cheese products can cause a problem.
Pain medication - Oxycodone can really muck things up.
Keeping hydrated helps - Make sure throughout the day you are pushing your water intake!