What class airspace were you in? G?
There are many debates on the subject, but I believe you can legally fly (and log) in IMC in uncontrolled airspace; obviously without the clearence.
It is a completely differnet discussion as to whether that is a good idea or not.