Exposing foams stabilized by photoswitchable surfactants to UV light induces changes in surface surfactant concentration, leading to significant alterations in foam behaviour such as the generation of Marangoni flow and change in foam drainage patterns. The occurrence of Marangoni flow can be observed when either all elements of the foam or only their films are exposed to UV light. Conversely, changes in foam drainage occur when a macroscale portion of a foam column is exposed to UV light. To explore these phenomena, numerical models are developed and validated using experimental data. These models simulate the scale and profile of Marangoni flow from foam networks to films as well as the drainage flow within the foam network. Microscale findings demonstrate that Marangoni flow can be controlled by adjusting the intensity and duration of UV light exposure. Macroscopically, the drainage profile in exposed foam regions undergoes significant changes with varying UV intensity. Furthermore, beyond a certain threshold, the foam drainage reverses direction, contrary to gravity. The effect of foam interfacial mobility on the reversed drainage of both interior and exterior foams is analyzed. The findings provide a potential tool to control foam drainage behaviour without the need to modify other variables.