There are two parts to consider when it comes to how to clean an electric toothbrush: the toothbrush head and the electric handle. Keeping both parts clean is important, particularly after you have had a cold or the flu. Some electric toothbrushes do not have a removable toothbrush head (this is a one piece toothbrush) and some do (this is a two piece toothbrush).
After each time you brush your teeth, be sure to rinse the toothbrush head thoroughly, getting rid of excess toothpaste or food bits from your mouth. Once a month or so, soak your toothbrush head in a solution of bleach and water (1 part bleach to 10 parts water) for a hour or so. Rinse thoroughly. Wipe the base of the toothbrush head with a clean white cloth dipped in the bleach solution (do this before soaking the toothbrush head). When the toothbrush bristles start to splay open, it is time for a new toothbrush if you have the one piece electric toothbrush or new toothbrush head if you have the two piece kind.
Because the handle is an electrical appliance, it should not be submerged in liquid. Using a bleach and water mixture, dampen a small area of a clean white cloth. Wipe all over the handle. Dip a cotton swab in the bleach and water mixture and wipe out the area where the toothbrush head attaches to the handle (for a two piece toothbrush).
By using your electric toothbrush properly and taking care of it, including learning how to clean an electric toothbrush, you can be sure to get the longest life out of it.