Engine off.
It's most accurate when the engine is warm, then wait 3 min after turning it off, then make sure the cycle is perfectly vertical.
You can do that yourself by carefully balancing it or have someone balance it for you. If you are doing it by yourself I've found the best way is to kneel down on one knee and pull the cycle toward you (off of the side stand). You want it to feel completely neutral and perfectly balanced. Then look at the siteglass for the level.
If the cycle has a centerstand you can use that also, but you need to make sure the spot where you check it is level.