Well, I did spend one very cold night in the hut (there was no door at the time).

And there are a few bivy shelters built out of rock at the summit, so others have obviously camped up there.

I'm not aware of any restrictions, but when I picked up my permit two years ago they never said not to when I said I might end up staying at the top.

Be aware if there is thunder and/or lightning, you do NOT want to be on the summit (in or out of the hut). Hightail it back down to at least the bivy sites at the JMT junction if bad weather approaches the summit.