Is there an aircrew bunk in the 747 cockpit?
Yes, there is a crew rest with two beds (bunk) connected to the cockpit on the 747. As MainMa notes, this can be found on 747-400 or 747-8 models, but not the older models. It can be seen on the seating charts here:



The crew rest is directly across from the two lavatories. While the lavatories open into the aisle of the cabin (grey area), the crew rest opens into the cockpit. There is a layout here that shows a how the upper deck is arranged. It's a freighter, but is was converted from a passenger plane, so it has the same crew rest location.

With the introduction of the 747-400, the position for the flight engineer was removed (seen below), with those functions being replaced by computers. This opened up a bit of room behind the pilot seats.


Source