While you are secretly smoking in the toilet and laughing gleefully at the thought of fooling the crew,all of a sudden there is a decompression the following will take place:
The oxygen mask in the toilet drops from the compartment and in a modern aircraft like the B777,B747 and A380,oxgen will be released through the mask without even you pulling it. The moment the oxgen comes into contact with your lighted cigarette,it will ignite and you will be blown out through the toilet door and land in the cabin like a smoked salmon or worst still you may even be a burnt bbq charsiew/pork. If you are lucky and survived and the aircraft is not on fire you will be apprehended and spend your whole life behind bar.
The only time you may avoid the above from happening if there is a decompression is to politely ask the cabin crew for a toilet that does not have any oxygen mask.