I think you have to actually check-in... I've read of people who make a reservation at a local hotel, go check-in, then go home... just to get the points or nights or maintain status. Although, if you have to cancel by 6pm (or whatever) time and you don't.. they charge you for that night, so I think you should get the points but I'd check with Marriott.
New Hilton is correct. You collect points for the "stay", which doesn't count unless you check in. I also agree that if I neglect to cancel and then get charged for the night, I ought to get the points that go along with that expense. Can't imagine what kind of good reason Marriott has for this policy.