Hm.. I don't think there is a specific time you need to do it, but try during morning and day, if you can. Weather-related, it shouldn't matter, as far as I know. Keep trying, headbuttable pokemon take awhile to encounter.. but if you don't encounter any at all, something is wrong.
Wait, which side of the forest are you headbutting trees? Left or Right? I think you can't encounter pokemon in the right side.. or it may be only for pokemon in the grass.