ANSWER:
No problem in this as long as his prime intention is to do it for the sake of Allah.
The prophet salla Allahu Alaihi wa sallam used to come home after Fajr and ask if they have any food to eat. When they told him they did not have anything to eat, he would say to them, then I am fasting today.
