Is rest used to mean the same thing in the next two sentences?

I need to get a good rest tonight; I was up late last night.

The gun was steadied on a special rest.
different meanings