Yes, valgrind will certainly work for daemon programs.
Many daemons have some kind of debugging mode, for example, a switch -Xto apache, which will lead to them not plugging or going into the background, in which case the easiest way to defile them may be to use this so that they remain attached to the terminal.
valgrind, , , --log-file , --trace-children valgrind , .
, , , , .