He's bored and you're entertaining.
Cats really are simple creatures. For eons they have survived by concerning themselves with three basic things:
Almost all behavioral issues in cats have to do with one of these three things. The strongest, without any question, is number 2; otherwise the other two won't matter.
For this reason, if the cat perceives a threat, it will usually stop its other normal behaviors, even eating, until it again feels secure in it's environment.
Almost always behavioral changes have to do with a defensive reaction to a perceived threat, or, in the case of attacking and biting, possibly a misdirected attempt at stalking and hunting.
The key for you is to not allow him to get into "attack mode" and if he does, not be there for him to attack. If you think it might be cats or birds outside that he is watching, provoking his hunting and attacking behavior, you need to crate him or in some other way keep him away from the windows.
If you think this is a misdirected play behavior that involves stalking and hunting you, you are correct, most owners can predict when it's coming. You must alter that pattern. Cats are pretty routine so they usually incite this at the same time and place. Avoid the cat during these times.
Another alternative is to provide him a play mate....another young male cat to do this with. By far that's often the easiest thing to do.
To entertain him try enriching his environment. Some suggestions:
Move the cat's food bowl to a different location in the house every 1-2 days
so the cat must search for it. (This is best done with young healthy cats.)
Obtain ornamental "cat shelves" that can be mounted on walls in decorative
patterns that allow the cat to use multiple levels in the house and move
through the house via different pathways. (See "The Cats' House by Bob
Walker.) Alternatively have a variety of sizes of cat trees in the home.
Make single cat sized perches on windowsills (these can be purchased
commercially), in bookcases, on appliances, etc. Rotate the location of these
perches periodically. (Note that many cats enjoy resting in the sun and will
move to find such spots throughout the day.)
Give the cat a stuffed toy to attack and "beat up." Placing catnip on the toy
may increase the cat's interest.
Set up bird feeders, squirrel feeders or cat videos for the cat to watch.
Give the cat access to paper bags or cardboard boxes.
Cats frequently like large mobile-like toys that move and jerk when they swat
Offer clean natural wood branches for the cat to chew.
Certain bird toys may be acceptable for cats and more appealing than dog or
cat toys. Many small dog toys can also be used for cats. Cats will sometimes
chew on small rawhide strips and other dog bones.
Train the cat to wear a harness and leash so it can be walked outside or place
cat fencing around all or part of the yard. (http://www.purr-fectfence.com/)
Hope this helps. If so please click<accept> so that we will be here to answer other questions like yours. Thank you.