Its a fixed prop. Never had this noise before and it is loud. There appears to be very little vibration on the shaft while its running and can't shake it when its still. Would the cutlass bearing cause this? Is it in the transmission itself?
The next time this occurs, look at the prop shaft. It is probably turning. Check the Yanmar manual, it will specify whether the transmission should be in neutral, reverse, or forward. Follow their directions. A freewheeling prop on some transmissions will damage the transmission. If the transmission should be in neutral, shut down the diesel while in gear, then shift into neutral. If the prop is spinning in gear and then you shift to neutral the prop may continue to spin once the diesel is shut off. This will happen with my feathering prop, if it is turning and I shift to neutral while moving, sometimes it doesn't feather. Putting it in gear stops the spinning and the prop feathers.
If the boat is moving at a good speed when the diesel is shut off, water pressure on the prop will cause it to spin if in neutral. At slower the speeds the prop will either turn so slowly that you don't notice it or it won't turn at all. You may have noticed it now because something is slightly different on the boat that causes it to resonate.
A worn cutlass bearing might be an issue, if it is worn there is less friction so it is easier for the prop to turn. If the cutlas bearing is worn, the shaft will wiggle in the bearing. How old is the bearing?