What ever the cause, this behavior is unacceptable! The only likely physical cause for unusual behaviors is a neurological abnormality like unusual seizure activity or brain tumor. It is more likely purely behavioral. I would take your dog to a veterinary teaching hospital with specialists in neurology and behavior so all issues that I have mentioned above can be addressed. There are no over the counter medications or methods that will set you mind at ease enough for you to trust your unpredictable dog. There are treatments both medical and behavioral that can possibly treat your dog but they must be done by a professional. There are even holistic treatments that may help your dog but they must be done by a veterinary acupunturist or vet versed in holistic veterinary medicine. I would be glad to refer you to a list of veterinary teaching hospitals in your area. Just post you city and state.
First you need to rule out a physical problem, so take him to the vet for a thorough checkup.
You mentioned he had training classes as a puppy. Have you kept up working with him every day when the classes were over? I've seen this kind of behavior develop in dogs who become very insecure and fearful when they don't understand their place in their Pack. I suspect your family and your dog need a major life change in your relationship together.
Because your dog "attacked" your husband while you were both laying on the bed, I suspect your dog has designated himself as the Pack Leader, with both of you somewhere beneath him. He thinks he has to "protect" you, and sees your husband as a threat. You CAN change his mind and behavior.
If you aren't already doing so, take him on a 45-minute walk at least once a day - twice is even better. When I say "walk", I don't mean using one of those awful flex-leashes and letting him do whatever he wants to do. You need to be in a calm state of mind, use a 5 or 6 foot leash, and keep him right beside you or slightly behind. He can only go ahead of you if he's walked calmly and properly for a good 10 minutes, and needs to know that he goes forward only because you are allowing it.
As to the crate issue, he's obviously connected it with "something bad" and you can change his attitude about that. Crate training is a good thing, but the dog needs to look at it as a pleasant place to rest and relax. The world he needs to worry about and guard becomes very small so being in the crate is a place to decompress. Make sure it's big enough that he can comfortably turn around in it, and place some kind of padding on the bottom. Also add an article of your non-laundered clothing so he associates your smell with the crate. Keep the crate with the door open, in a place where he usually hangs out during the day. Throw treats into it and make it a game for him to go in and get them. Start feeding him while he's in the crate as well. You want to help him have good associations with the crate so it isn't traumatic when he needs to be in it.
I strongly urge you to contact a veterinary behaviorist rather than a dog trainer to help you with these issues. In addition, go to the library or bookstore and get a copy of any of Cesar Milan's books (The Dog Whisperer) or DVDs. I can testify that his analysis of dog psychology is spot-on, and his techniques are both gentle and effective. It all stems from understanding how a dog's mind works, and working with what he is genetically wired to do. Your dog isn't a "bad dog" - he's just a very confused dog who needs to learn that his place in your pack is beneath the humans he lives with. Because his behavior has escalated into the "red zone" by attacking your husband, you can't wait. Start calling for a behaviorist in your area right now.