Good question! Cats do many many strange things, and this is definitely one of them.
Most likely, your cat is playing a game. Beds and couches are soft places, so cats love to play on them.
If your cat is pouncing on the bed while you are in it, he may be trying to get you to participate in his game. Cats love when things move underneath the covers. This game is really fun for them. Cats will almost always attack something when it moves under the covers. Give it a try!
Believe it or not, your cat may be playing games with you at night while you are sleeping, and you may not even be aware of it. Your cat may be pouncing on your feet while you sleep. When your cat does this, you probably move your feet, which makes the game even more fun for him! Kittens very frequently bite their owners feet during the night, which will frequently cause you to awake!
If your cat is scratching on your bed, you should watch him carefully because sometimes cats will scratch or paw at the covers or couch before they pee on it. However, if he is simply pouncing on the bed and attacking the sheets, he is probably just having a really good time! Feel free to join the game!