This, which also works, is a simple edit of your code.
Code:
tell application "OmniGraffle Professional 5"
set theDocument to front document
set canvasCount to count of canvases of theDocument
repeat with canvasNumber from 1 to canvasCount
set oCanvas to canvas canvasNumber of theDocument
set lyrNotes to layer "Notes" of oCanvas
set blnVisible to visible of lyrNotes
set visible of lyrNotes to not blnVisible
end repeat
end tell