If you close the sparrow window instead of hiding it, the sparrow button in the dock needs to be clicked in order for sparrow to generate the window again. So I got it to work completely by scripting in the click on the 'Sparrow' item in the dock:
on alfred_script(q)
delay 0.5
tell application "Sparrow" to activate --- activates sparrow
tell application "System Events"
tell process "Dock"
click UI element "Sparrow" of list 1 --- click the dock item to generate a window
end tell
tell process "Sparrow" --- implying Sparrow is already activated
key code 3 using {command down, option down} --- send cmd+alt+F to Sparrow invoking search
keystroke q --- enter the query
end tell
end tell
end alfred_script