Assuming you mean while the car is parked and not in motion, then yes, it is perfectly okay to sit on the trunk of your car. There's no law against it and it's not going to damage the car in any way. Some people might think it's weird or strange, but as long as you're not doing anything illegal or harmful, there's no reason why you can't do it. So go ahead and enjoy the view from up there!