It's true that thermal expansion of plastic and metal explains a lot of the noise, like someone mentioned above. But if it's really bothering you at night and it just started happening a week ago, it's worth checking a few simple things before you panic.
First, make sure the indoor unit is properly fixed to the wall - vibrations that amplify can create weird creaking sounds. Try putting something soft between the AC and the wall to dampen it. Also check that the condensation pipes aren't clogged - sometimes water buildup creates strange noises. If you're hearing a sharp cracking sound and it's coming from the outdoor unit, that might be more serious (compressor starting to wear out). In that case, call a technician.
After 3 years your AC is still pretty young, it's not like it's on its last legs. But if it gets worse or you notice the AC isn't cooling as well, don't put off getting someone to look at it.