On H4 you can not work and earn.
Even Thinking theoretically atleast,if you sell your patents you will recieve payment, say thro' a check.Unless you have an SSN,
you will not be able open an individual account and encash that check on your name.If patents are on your name,the payment check will be issued by the purchaser on your name only.
The other way might be sell patents from your home country
and check receipt in home country.But you may consult an attorney /auditor before you transact.You may need to check the case applicable whether the patent is awarded in US or in your country.or both.
------------------------------------------------------------------------------
Not a legal advise.Lay man's opinion.